Move tests into the flags package

This way of doing things avoids refering to the
package name in the tests, which makes life easier for
others who fork the code, because they do not need to
update the imports.
Ignore newlines in descriptions

The previous behavior was to skip the description entirely.
Now we strip out the newlines, so that the description will not
be eaten by a misplaced newline.