API improvements

Update, add, delete where checked and tests added. Exceptions module was created.
We can rename this function to update_json_file, and then pass it a full path to the file with extension.