Updated the exception handling system

-Exceptions are now stored as exception objects
-Exceptions and update information are now logged to a log file
-Log file is now properly closed when the bot shuts down
-Added the possibility to download updates from a webserver
-Made the queueMessage function actually queue a message, rather than
doing nothing
-Fixed an SQL injection vulnerability