Default WebSocket URL to localhost when served from file://

Convenient when developing. Also, before this change the WS URL
setting UI would not showing up, making it hard to customize the URL.
Merge pull request #13 from jonnor/default-ws-url

Default WebSocket URL to localhost when served from file://