Proper usage of __dirname when compiling modules