I prefer to write in a pointfree style where I can, and will avoid assignment where I can, as mutable values are a source of bugs. 
I'd normally use a discriminated union, but for the value i'm getting this is the most concise, readable and provably correct manner I could ensure that the path was correctly joined despite differing slash forms.