use __dirname and path.resolve for paths

Fixes the comment I made here https://github.com/carldanley/node-gamepad/commit/ec1cca7ba88e0fdaf01483217193feeb0030a3e9#commitcomment-6570721