Fix for message.data check on Mac

Another fix for Mac, please :-) The message data wasn't passing the comparison check with either 'down' or 'up', apparently due to the data being binary rather than a string. An explicit bytes conversion for the string we're checking for did the trick...