Sublime Text 3 / Python 3 fix

Should make it work both in Sublime Text 3 and Sublime Text 2.