Fixes to make it run on Sublime Text 3.

In general, relative imports are discouraged so appended the local
path to sys.path. Also moved the insert code into a separate
TextCommand (required by ST3, due to handling of edits).