Allow for export to single csv
I thought it would be less re-work to do this refactor ahead of adding tests and documenting the behaviour of the script, so have put this together ahead of #1 (closed).
This MR is a bit too large for my liking, but I decided to restructure the config to contain a list of queries
rather than having individual identifiers
groups
institution
blocks as before. I think this is a bit more expressive. The format of the config will be documented in #1 (closed), but I've updated the example, so hopefully that makes it clear about how institutions / groups / ids can be queried.
I've also snuck in a resolution to #4 (closed) given that it's a small change.
Closes #6 (closed) and #4 (closed)