Update for Python 3.x & SublimeText3: add encode/decoding