Fixed missing directory when trying to create the cache file