Make sure we check that there are TPIs to analyse before we call a
TAP generator.

With this change, issue #5 seems partially resolved.