Duplicate addresses would be appended to the list, and could push out other
addresses. If the address already exists, only move it to the top if it is
not already there.
Also don't force an immediate write of the host config file when trying to
add an address that already exists.