Add exception handler to main

The main function now handles exceptions, printing them to the console. Fixes
specifically. Thus, main's exception handler decorates the message with
"Uncaught error".
Add error object for failure to load file
Merge pull request #561 from david-christiansen/issue/560

Add an exception handler to main