fix for using livereload.js over https

We can detect the connection protocol through the global location variable and then set our websocket protocol to either 'wss' or 'ws' accordingly.