Updated root path function and tests.