Fixed a few bugs in wildcard matching.

Wildcards are anchored, unlike regexes. Furthermore, ? in a wildcard
always matches a single character, not at most one character.

Added tests as well.