Add and use function test_pem to work out test filenames.