Turn the code into a Python library

This follows [the tutorial by Scott Torborg][1]. I've split the script
into three files with different classes, plus another with the main
entry point. Rename README.md to README.rst because of Python
conventions. I've also introduced a failing test.

I think this is what progress looks like.

[1] http://www.scotttorborg.com/python-packaging/