Fix main exit code and build.
Merge pull request #122 from ambiata/topic/fix-main-exit-code

Fix main exit code and build.