Fixed the RootPath plugin: empty path_to() now works well

I also adjusted and augmented the corresponding test.