Media: bugfix delete file when renaming