Create the directory containing the cache file if we must