test/rilmodem: Make telnetlib reads/writes compatible with Python 3

The API now expects byte arrays instead of strings. This change affects only emulator testing.