Fix assertion failure when compiling stdin with debug info.

(The important change is in DebugInfo::getOrCreateFile; the other
changes are just consistency/cleanup.)