Fix EZP-22915: Clearing caches fail if cache folder is symlinked