Fix tests on Windows
Fix tests on Windows

- Get the script path directly from `__file__` instead of by starting
  a subprocess, because if the path contains Unicode stuff, it's not
  practical to decode it from the subprocess's output.

- Work around how `Popen.terminate` works on Windows.

- And while we're at it, use Pylint's `tmpdir` instead of manually
  working with `tempfile`.

vfaronov/mitmproxy-httpolice,vfaronov/mitmproxy-httpolice