Introduced PathResolverInterface

I think this is much cleaner solution then #1.