handle buffer edgecase

Closes https://github.com/andymccurdy/redis-py/issues/521