How do i write a script that modify every material in the scene by creating and connecting a "UV map" node to every texture file node? I have a few hundred materials in the scene. Every material have 7 texture files. 

I need to create and connect a "UV map" node with default UV map chosen (there is only one UV map on the objects) to every single texture file there is. Doing it by hand is very time consuming. 

Is there a way to automate this process, by python script perhaps?

Here is picture, it may help you to understand what i want to achieve.
This script will iterate over all the materials in your scene, and add a texture mapping node to each material that has an image texture node. The mapping node's UV output applies the default UV map of the object using the material, so it should achieve the same result as using a UV texture node (that uses the default UV map). The script will then connect the mapping node's UV output to the image texture's input and that should do the trick.

Disclaimer: This script assumes you are using Cycles and will probably only work in with Cycles materials.

import bpy

M = bpy.data.materials

for m in M:
    t = m.node_tree

    # Get all image texture nodes in each material's node tree's
    img_textures = [ n for n in t.nodes if n.type == 'TEX_IMAGE' ]
    if len( img_textures ): # If material has at least 1 image texture
        imgTex = img_textures[0] # Get the first (and probably only) image texture node in list

        # Create a new Mapping node (its UV output uses the default UV map so it's simpler than the UV map node)
        texMap = t.nodes.new('ShaderNodeTexCoord')

        # Link the texture mapping node to the image texture node
        t.links.new( imgTex.inputs[0], texMap.outputs['UV'] )