Replace old watchdog script with the new system that we used on Failstation, plus some fixes.