Prepare for situation where dir() returns Str