Before the idea was that check_glob would throw out any invalid globs, and then
if they somehow got through glob would just fail to match. I now feel it would
be better if it also complained on finding an invalid glob, although it will
only detect an invalid glob if the pattern matches up to that point.
This is based on Rene's implementation, but I used my own glob function,
and adjusted a few things since it's now always using ascii. It would be
nice to support unicode, but that would require at the very least a
normalization library, and perhaps more than that.
[SVN r86699]