Partial python3 compatibility

* urllib.quote -> six.moves
* update travis settings
* relative imports