Fix Python 2.x support.

Travis builds failed for 2.7 and PyPy.  Also added tox testing
support to help prevent regressions.