Resolve localhost to 127.0.0.1 without using DNS

Signed-off-by: Andrei Dinin <adinin@pivotal.io>