Make transferEncoding configurable, fix FilePart constructors, close #647