ERT-624: Fix in ert_test_runner.py: refactoring