Fix NoMethodError "tr" for params with dash

Also fixes a nil being passed to CGI.unescape.

Closes #890.