Reviewed code for X-Sendfile2

Made some small changes which might have caused a segfault on ci.tmit.eu earlier.