Fix buffer class to ignore binary data better

Fix our buffer class to be better aware of what is being written.
If we're writing a header, make sure we're writing two byte strings
properly
If we're writing just a single line, make sure it's a byte string that
ends in our file marker.
Inherit from Python3's BytesIO so that we leave binary data properly
alone
Fix another instance where we used a built in object as a variable name
Fix syntax error for Python2.5
Now that we're better ensuring a byte stream result, we can avoid double checking our packet.encode() result
Only convert our EOL and SEP once
Avoid storing a result we're only checking and then discarding
Add comment about encode() returning byte string
Fix incorrectly encoded binary data (images) and minor code cleanup
1.0.1 Version