<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cfgdump(path, config):
 """Create output directory path and output there the config.yaml file."""

    dump = yaml_dump(config)
    if not os.path.exists(path):
        os.makedirs(path)
    with open(os.path.join(path, 'config.yaml'), 'w') as outf:
        outf.write(dump)
    print(dump)