Miscellaneous fixes

A few miscellaneous fixes I needed to get the plugin working with gedit 3.10.4.