[FIX] Fixing reading and writing of comment lines in SAM headers.

Fixes #489