Added support for tox.
Fixed test for py3.