Fix bug in score tree with path function
Add test for score tree with path