Refactor caching on a per-file basis (even more speed up)

Processed files are now individually pickled in the cache directory in a
structure according to sha1sum.