De-inline path matching code from quick open filter template class
This reduces template code and makes it easier to change this code without having to recompile everything.