Fix query path matcher

I made a blunt mistake when forgot to check for '?'

The fix should be as followed:
```c
if (*path == 0 && (*q == 0 || *q == '?'))
```
Merge pull request #47 from truongminh/patch-2

Fix query path matcher