This patch backports some fixes which remove unneeded temporary
files upon exit, thus preventing accumulation of temporary files.

Index: pkpgcounter-3.50/pkpgpdls/analyzer.py
===================================================================
--- pkpgcounter-3.50.orig/pkpgpdls/analyzer.py	2008-12-04 07:35:51.000000000 -0600
+++ pkpgcounter-3.50/pkpgpdls/analyzer.py	2008-12-04 07:37:31.000000000 -0600
@@ -55,7 +55,6 @@
         self.options = options
         self.filename = filename
         self.workfile = None 
-        self.mustclose = None
         
     def getJobSize(self) :    
         """Returns the job's size."""
@@ -97,7 +96,6 @@
         
     def openFile(self) :    
         """Opens the job's data stream for reading."""
-        self.mustclose = False  # by default we don't want to close the file when finished
         if hasattr(self.filename, "read") and hasattr(self.filename, "seek") :
             # filename is in fact a file-like object 
             infile = self.filename
@@ -107,7 +105,6 @@
         else :    
             # normal file
             self.workfile = open(self.filename, "rb")
-            self.mustclose = True
             return
             
         # Use a temporary file, always seekable contrary to standard input.
@@ -123,8 +120,7 @@
             
     def closeFile(self) :        
         """Closes the job's data stream if we have to."""
-        if self.mustclose :
-            self.workfile.close()    
+        self.workfile.close()    
         
     def readFirstAndLastBlocks(self, inputfile) :
         """Reads the first and last blocks of data."""
--- pkpgcounter-3.50.orig/pkpgpdls/pjl.py
+++ pkpgcounter-3.50/pkpgpdls/pjl.py
@@ -129,12 +129,12 @@
         klass = PJLParser
         if arg == "-" :
             infile = sys.stdin
-            mustclose = 0
+            mustclose = False
         else :    
             if arg.endswith(".ejl") :
                 klass = EJLParser
             infile = open(arg, "rb")
-            mustclose = 1
+            mustclose = True
         try :
             parser = klass(infile.read(), debug=1)
         except PJLParserError, msg :    
