allow transformPath option

I added an option to add a transformPath function in case path need to be modified before search happens.
It was necessary in my case.