update require_dir directive test, sort path listdir