Prototype logger.
Closes #6 (Logging) and Fixes #11 (Error handling).
Merge pull request #22 from doxxan/logger

Logger