Added a little bit of functionality to save JSON formatted data to a file.