Added fix for Bam files with empty headers. Added test for this to unit ...

...test.