Path subst encode + slash fix

This is a followup for the previous path substitution fixes. This fixes usage of cases where source and target use different slash types for path separation and/or use url-encoded vs. not encoded.