Updated filelist to handle directorys