Fixed a bug with path resolution in windows

when given a windows absolute path ('C:\<abs-path>')
the old code assigns:
dir <- path.join(process.cwd(), dir)

that is: 
dir <- 'C:\<path-to-working-directory>C:\<abs-path>'
(which is not what we want)

I replaced the old code with node's 'path.resolve'