Remove thumbnails when updating a file's location.

Make sure that the file is deleted from the old location only if the file save succeeds.