Fix error when setting enable_ipv4_localhost to false

Fixes github issue #14
Add spec test for enable_ipv4_localhost = false bug
Merge pull request #15 from emahags/localhost_absent

Fix error when setting enable_ipv4_localhost to false