Fixed File::dir max_level algorithm