fix safe_urlencode() (issue )

Fixes issue #20.