Purge the image cache if a file is being renamed (see #6641)