Write only one logrotate entry for multiple paths

This inverts the path processing so that we write just one logrotate entry for multiple paths. This makes `firstaction`, `lastaction` scripts, or `prerotate` and `postrotate` with `sharedscripts` run just once, as expected, when multiple paths are specified simultaneously.