Error in Session.send_raw()

Addresses issue ipython/ipython/#4839.

(This is my first pull request, and first contribution to ipython, so should be checked to make sure that my assumption about the problem is correct).