CLI testability improvements + new CLI tests

- Changed all the exit statements in the CLI into exceptions
- Created a bunch of new exceptions
- Modified /bin/zoph to catch them and exit with the formerly specified
exit code
- Added more tests for CLI
- Fixed a few bugs in CLI