Adding a proper exit code

If the application errored, it now exits with 1 instead of 0. Closes #38