Close the tempfile for shell provisioner [GH-1040]