ReadFile reads FILE_START, FILE_CHUNK..., FILE_END frames from r into destDir.
progress is called after each chunk. Returns the path of the written file.
WriteFile sends FILE_START, FILE_CHUNK..., FILE_END frames to w.
progress, if non-nil, is invoked after each chunk with (sentBytes, totalBytes).
transferID is echoed in FILE_START so the receiver can ACK against the same id.