Merge "Canonicalise path before extracting relative path" into tm-dev