Output Node with Python
It's better to not use operators, there is a sophisticated "low-level" API for the node interface:

import bpy

scene = bpy.context.scene
nodes = scene.node_tree.nodes

render_layers = nodes['Render Layers']
output_file = nodes.new("CompositorNodeOutputFile")
output_file.base_path = "//maFolder/"

scene.node_tree.links.new(
    render_layers.outputs['Image'],
    output_file.inputs['Image']
)


You basically need to create a node and a link, and specify the input and output for the latter on creation to establish the connection.