Fixed running `python examples --test` for python3; needs to be tested under windows.