improved/reimplemented uri_unescape()