Work around unicode errors in Python 2 (ST2) when logging

Also I grabbed common, which had some fixes from Emacs-land.