add cache_dir

Add an argument to `ParserGenerator` that specifies where the cache should be stored.

TODO:
 - tests
 - docs


At this point I'm mostly looking for feedback on whether this feture is worth adding. It's useful for me because computing the tables takes a long time (~5min) and functionality allows me to keep the tables between reboots.
Is `basestring` really the correct type for paths? I think we should just pick unicode or bytes, whichever is correct, and use that.