Python 3 compatibility and Travis integration

This PR adds:
  - Python 3 compatibility sourced from burnpanck's fork.
  - Travis integration for Python 2.7 and 3.3.