Add run-tests.sh
Adapt code to python 3