text: Title: Replacing hard coded /tmp/ for some instances in the code
  Body: 
  # /tmp/ has been hard coded in some instances
  
  This will be replaced with https://docs.python.org/3/library/tempfile.html which has been well implemented in some instances in the code.