Replace std::os::glob with extra::glob, which is written in rust ...

... fixing issue #6100. This also addresses #6101.