Creating output directory if missing.