Add more extensive tests of FITSKeyword and fix a couple of bugs uncovered by tests

Closes #138