fixed _nonHtml to work on pathname only (without query string), added test

I was trying to add "nested" sorting to my app, with query params like:

`http://localhost:3000/users?sort=account.email`

It breaks Turbolinks - it's treated like a "non-html" link. I added some tests and fixed it.