Fixes errno value for opens without O_CREATE