Fix grants to work with wildcard hosts

The current grant code fails when using a wildcard host (%), because
it's not properly quoted.  Fixed the quoting and wrote a spec for it.
Merge pull request #40 from simpsora/broken_grant_check

Fix grants to work with wildcard hosts