code: def temp_file(part)
        file_name = filename?(part)
        File.expand_path(File.join(msg_tmp_dir(),File.basename(file_name)))
      end
docs: Helper for process template method to name a temporary filepath based on
   information in the part.  This version attempts to honor the name of the
   media as labeled in the part header and creates a unique temporary
   directory for writing the file so filename collision does not occur.
   Consumers of this method expect the directory structure to the file
   exists, if the method is overridden it is mandatory that this behavior is
   retained.