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 polluting the valgrind log with leaks.

Feel free to ignore if it isn't worth it.