Port to Python 3.
Make a small start on unit tests.

Also, small py3k bug fixed.
Moved the config out to a separate file.
Add my config as an example config.