Add XML output to modbus-discover
Switch to tail-recursion