better listdir() behavior