Added fix for cases of sending binary and text files
Merge pull request #2 from nopio/master

Added fix for cases of sending binary and text files