Minor cleanups to compiler.
Add caching for collects-relative->path.