Added isDir() top level implementation