Create needed parent directories when writing output files.