First commit. Just some logging code and some utils.

The logger needs better error handling, and email functionality. The
utils object is mostly a placeholder where we can put stuff.