Fix extraScripts legacy mode issue

If run from command line with just one extraScript, it was passed as a
string instead of a one-element array and hence not included in the page.
WIP: using primus instead of socket.io

This allows to change the transport easily if needed.