CDK-470: Adjusted the PathConversion code to encode String values to avoid creating invalid paths