Fix parallel testing by using the multi-process safe cbook.mkdirs

As referenced in #2046.