Make Python build scripts for Ninja work on Windows (#4962)
* Make Python build scripts for Ninja work on Windows
Issue Details:
Currently the Python build scripts that set up the Ninja build uses Linux/Mac OS specific commands/assumptions.
Fix Details:
* Explicitly run Python scripts using `sys.executable` (instead of assuming that the OS knows how to handle `.py` files).
* Handle Windows executables having a `.exe` suffix.
* Either change `git` commands, or use Python to process output instead of using other tools that don't exist on Windows.