Fix base path

If a URL object is used for `base` argument, the `path` array is shared by the new instance, leading to mutations of the base path.

Fixed by always copying `base._path` on assignment.