dirlist.c update, add method based on scandir.