don't assume File#isDirectory == !File#isFile - i.e. explicitly test
and drop objects that are neither files nor directories.  PR 56149



git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1573999 13f79535-47bb-0310-9956-ffa450edef68