Finally, a working watchdog. Disconnects socket before rebooting Tessel every time, reconnects afterwards.