Make sure that the output directory exists