Improved SerialPortTest to run in Loopback mode.