CGI escaping for ruby2

URI.parse in ruby2 does not like |
Merge pull request #1 from stangel/patch-1

CGI escaping for ruby2