Make it so that all space insertion codes are none

This occurs in the quality xml files where the insertion code attribute is all
space when it means no insertion code. I encode this here since that is not a
valid insertion code anyway. Also, I've improved the tests so that they base
generator is tested a bit. I can use this later to cut down on the number of
tests I write.
Always strip extra whitespace from insertion code

White space is never allowed so I always strip it now.