Fix filepath never reaches root path
Merge pull request #12 from jedmao/fix-path-resolve

Fix filepath never reaches root path