Improved AlignmentSamDataWriter and getSequenceFromDifferencesTest.

AlignmentSamDataWriter is not tested yet.
Other minor changes.