Updates to the CSV upload handling

Hey @amercader, I've updated how the CSV uploads and downloads are handled in light of groups -> orgs change. I'd appreciate a review.