Change title of particle writing to unique parameters

Also only write the active particles, plus other changes to pdiag.f