code: def saveInputs(savedInputsDir, listOfFilesAndDirsToSave):
      
      logger.info("Saving the inputs: %s to the directory: %s" % (" ".join(listOfFilesAndDirsToSave), savedInputsDir))
      assert os.path.isdir(savedInputsDir)
      #savedInputsDir = getTempDirectory(saveInputsDir)
      createdFiles = []
      for fileName in listOfFilesAndDirsToSave:
          if os.path.isfile(fileName):
              copiedFileName = os.path.join(savedInputsDir, os.path.split(fileName)[-1])
              system("cp %s %s" % (fileName, copiedFileName))
          else:
              copiedFileName = os.path.join(savedInputsDir, os.path.split(fileName)[-1]) + ".tar"
              system("tar -cf %s %s" % (copiedFileName, fileName))
          createdFiles.append(copiedFileName)
      return createdFiles
docs: Copies the list of files to a directory created in the save inputs dir,
      and returns the name of this directory.