Prior to r259433, getCompiler could return None without causing a
test suite crash. However, passing a NoneType to realpath will
cause a crash. Prevent this crash by allowing getCompiler to return None.
I primarily wrote this because getArchFlag() accounts for the possibility that getCompiler() can be None. But my problem was unrelated, so I don't need this (and I agree that it would be surprising if anyone did).