Show "Confirm Delete" dialog for files, too

For #8651 and #10190
We got 18 occurrences of `folder` and 16 of `directory` in the whole file, so I guess both are okay.