fix url_for api compatibility issues

Hey!

As of version 1.1, the url_for helper does not comply with the original interface, incorrectly capturing the passed-in arguments. e.g: passing a list, passing target + hashref...

I add some tests unveiling this issue and provide a fix.

Cheers
Alex