Test tmp directory is now configurable
Python 3 compatibility: cannot write unicode strings to file objects
Python 3 compatibility: there is no xrange
Python 3 compatibility: FileNotFoundError is raised rather than IOError for missing files
Use utils.py3