Python Terminate Process Powershell Script Running Slowing