fix canonicalisation of paths