Quote special characters when updating the path.

`URL.path` method should quote special characters the same way `URL.path_segments` does.