perf script python: Correct handler check and spelling errors