Resolve "Resolve slow e2e-test"
Description
While the os.path -> pathlib.Path transition incurs a slowdown in some of the code, the issue was simply caused by a mismatch in return types which now has been resolved.
Notes to review (code/docs/QA)
Related issues
Closes #2259 (closed)
Edited by Vetle Simensen