Courfeyrac, with his sword, stands there to lure the zombies in. The barrels contain gunpowder and will be set off once the zombies get close enough.
Isn't he worried about getting blood on his nice dandy clothes?
Why do you think he volunteered to be the bait to lure them in? That way he can skip off happily untouched, get the honor of killing lots of zombies, AND have the cool "action movie" shot of walking off with explosions happening behind him...: )