length to a separate variable so that it will be easier to adapt to systems that don't have d_namlen in struct dirent.