Use llvm::sys::fs::createUniqueFile.

Include a test that clang now produces output files with permissions matching
the umask.