Added function to encode bytes and fix typo

_encode_bytes converts bytes into a buffer for _cmd
Merge pull request #6 from smschauhan/patch-2

Added function to encode bytes and fix typo