Initialize JMImageCacheDirectory and sharedCache atomically