A little bit more elegant path resolver