The MAX_PATH constant in windows is measured in characters, so multiple by 3
to get the number of bytes assuming worst-case UTF8 pathnames.
Use a new error code to represent a failure to get the configured temporary directory on Windows.
Slight modifications to path name translation handling for Cygwin.
Limit the number of memset() calls used when determining a temporary file name on Windows.  Also, fix a harmless compiler warning.