'canonicalizePath' was missing, making this function far less reliable. In order for this to work we have to work around circular imports with a IO.hs-boot file.