[EnduranceTest] Ensure the profile directory is always cleaned up before returning