Avoid cache collision for complex file structures.

Better names for cache files.  This avoids collision when using repeated file names in different directories.