various fixes; nix_fs_iter now uses readdir_r on Unix