Python 3 compatibility fixes (print/except/raise statements)

Still need further tweaks to properly work with Sublime Text 3