Python 3.4 compatibility

Fixed so that the unittests works in both Python 2.7 and 3.4 (not testing anything else but it may very well work).

Also done some minor manual testing.

This fix introduces a new dependency
https://pypi.python.org/pypi/future