Fix network magic to be bytes rather than unicode

Sorry, my Python3 compatibility broke this.