List tests issue

This fixes an issue when listing tests.  The problem can be seen by running the self test executable with the `--list-tests` arg.

It also adds a couple of CTest tests which invoke the self test executable, once with `--list-tests` and once with `--list-tags`.