Fixes an import as well as adds the temp directory cleanup.