Python 3 fixes, other fixes

- added .gitignore exceptions
- updated packages versions
- changed Travis build to test on Python 3.4
- updated code to meet PEP requirements and Python 3 support
- small tests updates