used scandir to list path contents in alphabetical order