Fix bug in writing sample output
Fixed bug with writing out samples

Different return value (0) signifies success with staden io.  This
caused a bug when switching from samtools.  This commit fixes that bug.