Replace fpassthru() as it can cause issues with large files on some systems (even 64bit).

Partial port of sabre-dav commit 52fb4a5f986466c3530af4d71e5c5a68e430efd7.

Conflicts:
	patches.txt