creates a cache directory if none exists