updated write_task to create a directory if one doesn't exist

I also updated the the multiple files test to test this functionality.