ensure output directories are created