Housekeeping; merging scandir_helper