jhm: Implement cache files.

Allows JHM to re-use already compiled results.

Note: Slower than necessary (Lots of extra stat calls). Will tune some.