pyterm: handle serial disconnect

* will reconnect automatically if possible after a disconnect
* resolves #910