Robustness for GHKM extraction

This commit includes a few robustness measures in GHKM extraction that got rid of segfaults on my machine. It skips bad lines on the input instead of just silently ignoring them, trims whitespace (which hosed the alignment-reading code), and makes some other small changes.