fix canonicalisation of paths

Before that when I were doing `cjsify -r src main.coffee -o build/out.js`, everything would be normal except for the root require, which would look like `require('/../main.coffee')`. This change fixes the problem.