Bug 856913, fix match pattern wildcard to not match invalid domains

Fixes instances when the following URLs were valid for the match patterns
```
  ok('*.ign.com', 'http://www.design.com');
  ok('*.ign.com', 'http://design.com');
  ok('*.zilla.com', 'http://bugzilla.mozilla.com');
  ok('*.zilla.com', 'http://mo-zilla.com');
```