Update tree.js

in windows system,path sep is '\',the old regexp is not match it. I whrite a
new regexp and fix it;
Fix unit tests for debug