fix handling of d_name in struct dirent