Strip-option removes *all* leading and trailing white-space.

I made another change you might want to merge back: the strip function did not remove the very final trailing whitespace. For example "some string\n\n" would be stripped to "some string\n". This change would strip it to "some string".

At least, this made sense in my usage, as I'm also producing TXT output, where trailing newlines make a difference.