replace path module from node.js to own making.