Handles magic cookie allocation error
Adds support for passing flags to New()
Updates README and adds sample code
Makes example code to appear in godoc
Puts some black magic for godoc to show the example.
Merge pull request #11 from c4milo/master

Adds support for passing flags to New()