Make unit tests work in Python 3; add a unicode text test.