Retry properly on DNS lookup failure. Closes #52