fixed problem with encoding running tests with ruby 2

This solve a issue I found trying to run the tests with ruby 2.
the string returned by the datagram has a different encoding from the expected result.

Checking the header bytes as an array will mitigate this problem.

cheers.