Fixed an issue where emit() doesn't work due to the JSON encoding being an incorrect format for SocketIO
Merge pull request #19 from mattmurton/master

Emit now works