Python 3 compatibility fixes.

Some fixes to make linters compatible with Python 3. These are quick and dirty changes to stop SublimeLinter raising exceptions in Sublime Text 3 and there might be better ways to make it compatible.