Correctly handle the cache directory location