Also fix and modernize the code, add tests.
The original findpacs() was returning either [Package] or ([Package], [str]) depending on the `fatal` option. This confused pylint and it was returning false-positives: E1101: Instance of 'list' has no '...' member (no-member)