Small fixes to avoid some exceptions

I encountered this exceptions multiple time with axon running on node 0.8.18
Error: This socket is closed.
at Socket._write (net.js:519:19)
at Socket.write (net.js:511:15)
at ReqSocket.send (proj/axon/lib/sockets/req.js:96:10)
....
And 
TypeError: Cannot read property 'length' of null
    at Message.pack (/proj/axon/lib/message.js:83:27)
    at Message.write (/proj/axon/lib/message.js:40:18)
....
Hope this helps without breaking anything else in the project design.