fix relative path problem

When you require phantomjs-server it can't find the phantomjs binary because it's path is always relative to current working directory. I've changed it to use `require.resolve` which should be more robust.