Merge pull request #120 from chris-allan/exception-handler

More robust exception handling in main() entry point
Properly handle SystemExit exceptions
Fix flake8 warning
merge master -D org -I include -E exclude: PR 121 (Handle SystemExit in main.py)