Return an error code if exiting due to an error so a higher-level Makefile or shell script is aware of the failure.
Merge pull request #7 from hexluthor/error-exit

Return an error code if exiting due to an error