Fix creating parent directories
This fixes a regression introduced by b9b1b7fa leading to an empty directory in the directory of the categorization results.
This fixes a regression introduced by b9b1b7fa leading to an empty directory in the directory of the categorization results.