Path resolveOutput(SmithyBuildConfig config) {
        if (output != null) {
            return Paths.get(output);
        } else {
            return config.getOutputDirectory()
                    .map(Paths::get)
                    .orElseGet(SmithyBuild::getDefaultOutputDirectory);
        }
    }
Resolves the correct build directory by looking at the --output argument, outputDirectory config setting,
and finally the default build directory.

@param config Config to check.
@return Returns the resolved build directory.
smithy-cli/src/main/java/software/amazon/smithy/cli/commands/BuildOptions.java