fixes issues with window when saving > 26 temp files.
_mktemp_s call that we use to create a temporary filename doesn't
return more than 26 filenames for a given pattern. We now handle it by
using GetTempFileName instead.
Edited by Utkarsh Ayachit