[driver] Implement the -fdebug-compilation-dir in a way that is compatible with
gcc.  No test case included as I'm having problems finding a test case where
the inode/dev don't match.