Fix CDATA tags and update for ST3

Sublime Text does not recognize the "official" CDATA tag escape mechanism of replacing "]]>" with "]]]]><![CDATA[<" so instead use the workaround (or hack) as described in SublimeText/UnofficialDocs#29.

And while I tested this in ST3 I encountered various problems and exceptions so those are fixed as well now, at least for me.