package.json: update major version for the changes of APIs; #3
adds a new method .write(); updates test cases; #3