Plug configuration file search paths tests leaks

This one might be a bit controversial as it artificially exposes a previously static function for the sole purpose of avoiding to pollute the valgrind log with leaks from tests.

Feel free to ignore if it isn't worth it.