* Add a mutex around /etc/hosts updates (for a little extra safety) * Don't write unchanged files * Recover from out-of-sequence guard lines * Add tests Thanks to granular-ryanbonham for the suggestions & finding the issue!