Use the TEMP environmental variable to get temporary file path

Use the Windows TEMP environmental variable to get temporary file
path.  While here, switch to using File::Temp->new() to create
temporary file for testing.

Tested under:

 - ActiveState Perl v5.14.2
 - StrawBerry Perl v5.16.3
Close out TEMP environment variable task