Email alerts and database logging

This PR fixes issue #4.
Email alerts are implemented, an email is fired off if a non-fatal exception is caught during communication.

Database logging is implemented, every line, a message is sent to a database table, and an error/traceback attached if an exception is caught.