fixed path.resolve throwing error in node 0.9.x with first argument not being string
fixed tests so they run on different platforms with path.join