Ability to turn off sendfile

This is a duplicate of #292 but should be possible to merge and the other PR is dead.