Add clear() and writeCenter(), bug fix

Removed some gets that were only there for an old test.

Fixed issue where glyphs[i] was one char off. made the assumption that
because lua starts at index 1, I probably should, too.

Added porting of clear() and wrteCenter(). need to test.