fixed undefined index error when deleteting files and no 'dir' option is set