Add methods to write to CSV and JSON

Prior to this commit, there was no way to write the generated data
about pull requests to a file. Now, there are methods available
which will write the collected data to either a CSV or JSON file
as specified. Tests for this functionality have also been added.