Don't use strlen to figure out message length, and update tests

The modem tests now intentionally stick a null byte in the packet they
send and then check the entire content of the packet with memcmp,
insrtead of strcmp.