fixed annoying error in _buffer_is_binary() which returned false sometimes even when the input were in fact binary. This fixes those 2 annoying unittests which failed from time to time.
started documenting the api.