BUG Prevent PHP from eating all memory when serving large files.
Merge pull request #6 from mateusz/large-files

BUG Prevent PHP from eating all memory when serving large files.
BUG Further fixes for large file downloads.

Initial submission by @devOp1 - thank you!

Improvement for files with spaces within filename:
added quotes to header filename=...

Improvements for downloads of large files:
* set_time_limit(0) prevent PHP from stopping the process
* ob_end_flush() clear PHP buffer
* session_write_close() stops blocking the session file of PHP. Without
this, the user can't visit another page of the same website during
download (see:
http://konrness.com/php5/how-to-prevent-blocking-php-requests/ )

Remark: Apache Config has to be changed as well e.g.
<IfModule mod_fcgid.c>
	FcgidBusyTimeout 3600
</IfModule>
BUG Handle filenames with spaces.

Initially submitted by @devOp1 - thank you!
Merge pull request #7 from mateusz/devOp1-master

A better fix.
Corrected an issue where a resampled image would return the original image reference.