Use extended encodeURIComponent to make sure quotes are also escaped.

Fixes issue #3.