Python 3 support

Fix some import bug. Add six hack to support python 2 and 3.

*Please, make all imports absolute, pep8 recommends it. http://www.python.org/dev/peps/pep-0008/#imports*