code: function writeKey(key, value, masterPassword) {
      var contents = getContents(masterPassword);
      contents[key] = value;
      var fileContents = JSON.stringify(contents);
      var encryptedFileContents = encryption.encrypt(fileContents, masterPassword);
      file.writeToFile(encryptedFileContents);
  }
docs: Writes a key to the safetext file.
  @param key
  @param value
  @param masterPassword
  @returns {Promise.<TResult>}