Script for making every material one material per one object
Thankfully it’s very easy. The material datatype has a method copy() which returns a new duplicate material.
Something like this:
for o in bpy.context.selected_objects:
    o.data.materials[0]=o.data.materials[0].copy()

This code assumes the material is linked to the mesh data block.