Exit with non-zero exit code upon error

The exit code should be set to non-zero if the program ran into an
unrecoverable error. We only do this if we fail at parsing the command
line options. We should however do it if any error occur.

Set the exit code to one if we catch an error.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>