Ensure output path always exists, including parents
When using a nested output path, the folder could not always be found. This caused output_path.mkdir()
to fail, as its parent folder did not exist.
Fixes a failing pipeline in CSE2525.
Edited by Yoshi van den Akker