Extract canonicalizePath to Lib.FilePath
Extract BuildMaps.findDirectory