Create paint_on_cycles_image_node.py

This script sets up Texture Painting Image Slot (in Image Mode only) to selected Image Texture Node inside Cycles Material.