Make sure the cache directory exists.