Create parent directories for output folder if needed