Cache glyph id and fix Makefile

Did what I promised on twitter! See the commit messages/diffs to see what I'm talking about.