Handles system exit in main loop exception handler
Merge pull request #6 from matthewturner/system-exit

Handles system exit in main loop exception handler