This mumbo-jumbo could be replaced by __dirname, right :) ? 

http://nodejs.org/docs/latest/api/globals.html#globals_dirname