Hadoop shim: use isDir instead of isFile to make the it work with older hadoop API.