remove undefined behavior

remove undefined behavior, which just worked accidentally.
Merge pull request #12 from nobu/Dir.glob-undefined_behavior

remove undefined behavior