Making sure URIs are escaped to handle ugly paths