Add Python 3.x Compatibility

This works on Python 3.3.5, 3.2.5, and 2.7.7.