Don't create the nid entry for non-directories.