Allow Query parameters at the end of URLs

My images have Query URLs appended to them to get past some annoying proxies that don't always respect headers.

For instance /static/image/logo.png?hash=d41d8cd98f00b204e9800998ecf8427e

The code as written won't detect these URLs, since the ? and = aren't in \w

This patch simply expands the regex slightly to allow those to get through ;)