Don't return anything from Path.prototype.replace.

Also, assert that the replacement is not happening at the root of the Path
tree, because that probably wouldn't have done what anyone wanted.