streamCopy() should return proper structure.

Callers of streamCopy() expect an array to be returned containing count and result.

refs 5251

backport required as this could cause data loss/file deletion

@karlitschek @icewind1991 @bantu @bartv2 THX