1. Are you sure this works on Windows?
2. This should **never** work. The RHS string could be user supplied and contain a `..`. What is the use of a URL/path toolkit if it doesn't escape and such for you?