Fix script to run unit tests follow changes from erp5.git

This script is copy/paste from erp5.git/product/ERP5Type/tests/backportUnittest.py. Then, I applied all changes from the same file to fix the issue.