Show "Confirm Delete" dialog for files, too

For #8651 and #10190
Since we are here. We should use `directory` instead of `folder` in both the id and the text, since we use directory on every other place.