encode_url_path function

Properly escape a URL path