This assumes that the .pem and .key files are generated before running the test in a predefined path.

Maybe the generation (and cleanup) of the .key and .pem files could be done as part of the SHELL-INIT (and TEARDOWN).