encode replacements before putting in path

* fixing bug from @noprompt writing bad tests :-)