CDK-470: Adjusted the PathConversion code to encode String values to avo...

...id creating invalid paths

I haven't ran a full build but here's a quick hack that I think will fix CDK-470.