Fix removing file when replaceFile method is used

In the `BaseEntityWithImageManager::replaceFile` when we retrieve `$oldDestPath`, the file can't be remove because the entity was update with the new file path.

So filesystem can keep a lot of unused files.