make sendfile() function (thanks @hodgestar)