Fix for uploading same named files.

When uploading a file that has identical name as the file that has been previously uploaded for an entity the new file gets uploaded and deleted instantly. This fix removes the uploaded file from the pendingFileRemovals list.