perf scripts python: Add Python 3 support to Core.py