Fix packet length encoding

The current packet length is bogus, but it somehow works. Following the
protocol description at http://wiki.vg/Protocol, let's prepend the
correct calculated packet length.
Merge pull request #73 from Lekensteyn/fixes

Fix packet length encoding