python: run tests for both python and python3.

This is to reduce failures like
https://github.com/android-ndk/ndk/issues/740.
Also fix some places for python3.

Bug: none
Test: run test.py.
Change-Id: I751ccbc9940efa8727ec7b19710d452896049762
7 files changed