Working with ST3

Fixes for python 3 syntax and string to bytes conversion.
Merge pull request #2 from shirosaki/python3

Working with ST3