Tests pass in python 3.3

Import py3.3 stuff from __future__
Various checks to change behaviour in py3