Make sure the string is NUL-terminated.

The internal byte array of the SmallString filled by createTemporaryFile() is
not guaranteed to be NUL-terminated. We need to call c_str() to handle it
safely.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193442 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Do not create a temporary std::string.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193444 91177308-0d34-0410-b5e6-96231b3b80d8
[PECOFF] Fix XML output bug.

We really need a test for the manifest file output, but because it depends
on external commands (CVTRES.EXE and RC.EXE), it's not very easy to write it.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@193445 91177308-0d34-0410-b5e6-96231b3b80d8