Python 3 compatibility fixes by Tomasz.
Move README to README.rst.