Update example in README

Fix bug in README example, where the file is opened in the wrong mode.
Merge pull request #4 from dougcole/patch-1

Update example in README