Fix issues with file canonicalization