Spin up phantomjs webdriver if none is running

Also refactor server.js a little to make consistent with driver.js