Fixed fqdn handling on debian/ubuntu

The issue was that the old method simply didn't work.  When the hosts
file should look like:
    127.0.1.1   host.fqdn.com host
It looked like:
    127.0.1.1   host.fqdn.com host old.fqdn.com old
Or this if the user didn't set a fqdn
    127.0.1.1   host host old.fqdn.com old

This patch fixes that.