support compilers that print messages relative to the project root

This patch attempts to support compilers that print output relative to
the project root but taking advantage of expand-file-name`s second
argument. It assumes that relative directories are *not* prefixed with
a leading `/` and absolute directories are.