Adds intelligent logging of errors

The main runner block is now mostly wrapped in a try...except, and the
except is set to catch any of the standard errors. When an error occurs,
we now display the message and exit.

This means that anywhere in the application, if I want to exit for any
reason, I can just raise an exception with a good message and have it
display to the user. The other important thing is that the traceback
will now log to the log file, so that if someone sends me their log
file, I should be able to get a much better idea of what happened to
cause the error.