Only call System.exit in case of non-zero exit value
moved main to a separate method to support calling it from outside
replaced all System.exit() with return
Merge pull request #124 from prezi/dont_exit_from_main

Don't exit from main() when it's not necessary