fix #34 Upload stream does not support pipe

addresses both pipe support and non binary encoding