I stole this bin file from coffeescript as I mention below so not sure.

Does `process.cwd` relate to where you call this bin file from perhaps, which could be anywhere? Whereas `fs.realpathSync(__filename)` would find the location of this script?