Use correct error message when renaming/deleting folder

This is for #8003.
I feel like all error dialogs should come through this method. It makes it a lot cleaner and easier to manage rather than having a bunch of "showModalDialog" calls. Error Loading Project dialog is implemented in a few places so this is a good opportunity to consolidate them.