Change references to 'localhost' to '127.0.0.1'.

It seems like cygwin inside of a vmware windows 8 does not have
localhost defined. Since we want this to work on mac and windows,
changing this to 127.0.0.1 should be fine.