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.