add more tests, including example with pull-goodbye
use pull-goodbye in tests
provide onClose classback
duplex wrapper takes options
document opts
Merge pull request #2 from dominictarr/master

make closeOnEnd = true the default, add tests, and document