Exit with status -1 when error

We have a couple of conditionals where the program may exit due to
errors. It would then use the constant 1 as the exit code. We want to
differentiate between errors and non-errors. Add a new status code for
errors and use that when terminating the program.

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