Support creating directories for dump command.