Patch to make tern work on my OSX box

On my machine, "localhost" resolves to IPv6's localhost, but as the tern server only listens on IPv4, connections always failed for me.  This patch corrects the issue so that both the server and the client always listen on 127.0.0.1, not "localhost".