Add tox test configuration

Fix tests to work with both python2 and python3