Switch to CGI.escape
Merge pull request #74 from ncbo/fix_bad_encoding

Switch to CGI.escape to fix encoding issues with '[]'