fix bug that DirectoryListener selects directories

WildCardFilter selects always directories (?). When the selected
directory is removed, the method isDirectory() will return false.