fixed unix varients of getTempFilename to not use tempnam