Use fwrite in the msvc tool instead of printf

This allows wide characters from the compiler to propagate through the
msvc tool.  Similar to ad76e867f782e75e0fed620e7b39f7099af154a9.
Avoid indexing into an empty string.
Merge branch 'master' into wstr
Merge pull request #628 from rnk/wstr

Use fwrite in the msvc tool instead of printf