test: enable passing wildcards with path to test runner
test: enable passing wildcards with path to test runner

Currently, passing wildcard testname args to the test runner from outside the `test/functional/` directory does not work. See this recent IRC discussion for more background: http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-10.html#l-262 (lines 262 to 323).

This small change enables passing multiple wildcards with paths, as long as the paths are coherent. Examples:
  - test/functional/test_runner.py test/functional/wallet*
  - functional/test_runner.py functional/wallet*
  - test/functional/test_runner.py ./test/functional/tool* test/functional/mempool*

A current limitation that this PR does not change: 9 test files with arguments in their name are not picked up by wildcard search.

- Squashed commit: non-mutating version

- Squashed commit: minor code optimisation


Former-commit-id: baa27c7cebc7c5c5f22c441ce5d7b007b3274f4e
syscoin/syscoin2,syscoin/syscoin2,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin2,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin2,syscoin/syscoin,syscoin/syscoin2,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin2