added Tox to test Python 2/3 compatibility

I added another evil metaclass hack to regex.py as well so that it would
run on Python 2.6, 2.7, 3.2, and 3.3, without any 2to3 nonsense. (Though I
will probably need to take a good, long look at unicode/str issues in the
near future.)