[#1865] Made the script a bit smarter at finding the host's FQDN, with
standard modules.