How often do you really need to delete a directory full of images? How often might that be a terrible mistake, even with the standard two warnings about "do you really want to do this?" If you are doing this more than even a little, I think you need some improvement to your workflow.
What happens if someone accidentally selects a top-level folder and impatiently clicks through?
Usability is also about not giving one the rope to hang themselves with.
If you really need to do this, how about: find these images and mark them as rejected. Then use the menu item to purge them. Then remove the folders.