Escape URIs before passing them to the shell