Added undo management to deleteSubdirectory.