Use standard 8k-buffer to copy databases

The original implementation was doing an unbuffered bytewise copy.