Add Travis CI configuration
Fix Python 3 compatibility