Python3 compatibility

Few simple fixes to support Python3 and add a tox.ini to easily test python2.7/3.3/3.4