Fix a traceback in the performance test.

Along the way fix a bug that was causing the test to run in
the wrong directory.

Ticket: #6431