add support for balanced parens in query

add support for query containing and ending in balanced parens such as
http://www.example.com?q=(1,2)