check to make sure the directory exists before working on it + write all the data in one operation
check to make sure the directory exists before working on it + write all the data in one operation

ryanking/conveyor