I currently have
matName = "Black"
blendfile = addon_dir + "/assets/materials.blend"
selection = "\\Material\\"
material = matName
filepath = blendfile + selection + material
directory = blendfile + selection
filename = material
newMat = bpy.ops.wm.append(filepath=filepath, filename=filename, directory=directory)
mat = bpy.data.materials.get(material)
bpy.context.active_object.data.materials.append(mat)
this appends a material and adds it to the current object. The problem is that it adds a new material slot with the material. How can I make it add the appended material to the active slot?