Fix how ws_url is set

IPython notebook 1.0.dev sends empty ws_url as of this PR
https://github.com/ipython/ipython/pull/3307
Default ein:query-timeout is nil if curl is used

this is to address #114
Use environment variable EMACS, if defined