Bugfix for working with Xcode/clang: Copy clang diagnostic files if compilation failed

clang's .dia files were not copied back if compiling failed. However, they are used by Xcode to display the errors found during compiling, which did not work with ccache so far. Now it does.