Add tie-breaker logic for globs

The rules I followed are:

If we limit globs to matching only the name and not the path, then we
have the following cases:

* `*_spec.rb` should win over `*.rb` or `rb`
* `Procfile` should win over `*file`

Given just these two examples, it appears that the winner is the longer
of the pattern sans wildcards. We may run into trouble if people start
doing crazy glob stuff like matching the path or alternations because
the naïve implementation I'm going to use is going to just look for
asterisks and question marks to strip.