1.0beta.6: fix SAM & BAM flags for first and last segment
1.0dev.6: add support for writing to stdout (+ bugfix for stdin)
merge
Merge in changes from master branch