Merge pull request #1557 from ratnikov/test-fix-build

Pathname doesn't have to_path in 1.8
Implement jar directory snapshot caching.

This improves jar globbing performance by about 4x on a simple benchmark.

For a jar containing 9156 files, 5.times { Dir.glob("file.jar!/**/*") } is:

1.7.10: user    1m24.332s
HEAD:   user    0m19.604s
Made the jar caching respect changing of jars on the filesystem.