Get tests and code working under Python 3.