tests: Add function to utils to calculate CONFIG_DIR

Based on pull request #809, which doesn't change all tests.

This PR adds a common function to be used by tests to figure out the configdir and adapts the tests to use it.
while at it -- os.path.join('config', 'fail2ban.conf')... who knows how life would hit us