def write(file_name)
      # Encode json string:
      str = JSON.pretty_generate(@dictionary)
      # Create directory if needed:
      unless File.directory?(File.dirname(file_name))
        require 'fileutils'
        FileUtils.mkdir_p(File.dirname(file_name))
      end
      # Write to file:
      File.open(file_name, 'w') {|f| f.write(str) }
    end
def write(file_name)
      # Encode json string:
      str = JSON.pretty_generate(@dictionary)
      # Create directory if needed:
      unless File.directory?(File.dirname(file_name))
        require 'fileutils'
        FileUtils.mkdir_p(File.dirname(file_name))
      end
      # Write to file:
      File.open(file_name, 'w') {|f| f.write(str) }
    end
Dumps the key/value pairs to a json string which is written to the specified file.

 @param [String] file_name the path to be used for storing key/value pairs on disk