Merge pull request #512 from nulltoken/fix/mktemp-segfault Prevent segfaulting on Windows when building a temporary filename