Add directory cache.
Move global cache unit tests to the shared cache tests.
Add test for the directory cache's name.
Add helper for cache tests, make counter global.

This prevents test collisions and race conditions.
Add repository cache.
Merge pull request #38 from Impromptu/caches

Add directory-level and repository-level caches.