Writing output to different directories.
Creating output directory.