code: def preparedir(target_dir, remove_content=True):
      
      if os.path.isdir(target_dir):
          if remove_content:
              nukedir(target_dir, False)
          return True
      else:
          try:
              os.makedirs(target_dir)
              return True
          except Exception as e:
              print("Failed to create folder: %s\n%s" % (target_dir, e))
              return False
docs: Prepare a folder for analysis.
  
      This method creates the folder if it is not created, and removes the file in
      the folder if the folder already existed.