Fixed tests if python is python3

On some distributions /usr/bin/python is python3, but python scripts
in tests/ are python2. To solve this, detect python and hand if over
to run_compare.cmake.