Tasklogs

This provides infrastructure and APIs for handling the individual logs created when running tasks.
I don't know if this will actually work. I don't know how send_file is implemented in this case, but it's entirely possible that it will only try to actually open the file after our function has returned, in which case no exception will be thrown here.