Port to gedit 3.8

A few simple fixes to get this plugin working on the lastest version.
Needed to be upgraded for python3 support.