Make creation of temporary file and directory more portable.  Also made cleanup code use proper functions to get paths.
Make creation of temporary file and directory more portable.  Also made cleanup
code use proper functions to get paths.

Changed the name of tar file that is searched for to be absolute (i.e., not use
os.extsep) since filename is locked in based on name of file in CVS
(testtar.tar).

Closes bug #731403 .

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator