add spec for Dir.glob with special directory name and fix it

* See https://bugs.ruby-lang.org/issues/8258