Fix exiting and propagate app exit code in non interactive mode.
Merge pull request #25 from Unity-Technologies/master

Fix exiting and propagate app exit code in non interactive mode.