Avoiding crash with hostname lookup error

In the eventuality of a problem in the parsing of dig -x output (used to find hostname), the program simply uses the IP address instead of crashing.