Added tcpListen; Added ability to set phantomjs port; Escape single quotes on API calls.