Introduce paths.js and imrove traversing tests