use erb
remove cgi require
Merge pull request #2 from supermomonga/urlencode

Should use ERB instead of CGI for url encoding.