core/rt: work on list_dir on OSX to diagnose bad behavior