Use hostname -f to get full machine name, including domain.

Some machines at CERN do not return the domain part with a simple `hostname`
invokation. This forces them to return their full name, so that we can check
for the references also for their case. Reported by @cerati, requested also by @slava77.