More work on making tests work on Python 3
Some small fixes from #19