Handle encoding issues in nsq._command, assert that body is an str, and add tests