[graphite2] Fix bunch of stuff

Based on patch from Martin Hosken, with review from Jonathan and I.
1 file changed