Create the output directory and subdirs if need be.