Bugfix: When replacing path segments, use re-quote-replacement to escape...

... any back-references in the replacement string.