reimplement shared bash scripts in python

Summary:
We have peru.sh and peru.bat, and also test.sh and test.bat. Rather than
maintaining both of those duplicates to support Windows, just
reimplement them in Python.

There's also validate-third-party.sh, but we never really use that on
Windows. We can port it in a later diff if we feel like it.

Test Plan:
Check that tests actually fail after introducing a bug. (To make sure
we're not actually testing the installed version instead of the repo
version.) Check that the linter fails after dirtying up some code. Check
that the untracked file test fails by creating a random file during
tests.

Reviewers: sean

Differential Revision: https://phabricator.buildinspace.com/D143