Fail with EINVAL rather than EIO on parse failure for backwards compat

Signed-off-by: David Scott <dave.scott@eu.citrix.com>