Make sure that the cache directories exist