Exit the main application with a status code.

Current codes are 0 for success, 1 for option parsing error, and 2 for
compilation failure.
Merge pull request #38 from jspam/017-exit-code

Exit the main application with a status code.