Fix tests for travis

Ready for merge.  All the tests now work in python 2.6 and 2.7.