Merge pull request #53 from peh/master

Fixed setSentinelMaster mis-assignment.
Ensure object output streams get flushed. Fixes #54.
Merge pull request #3 from jcoleman/master

merge newest master