Is there a way to automatically call "Make All Paths Relative" before saving?

Is there a way to automatically call “File -> External Data -> Make All Paths Relative” right before Blender saves a file?

(Even though I have automatic relative paths turned on in the user preferences, I’ve seen cases where this was ignored. I absolutely, always want to make sure the paths are always relative.)

Actually, scratch that question. Is there a way to call “Make All Paths Relative” from within Python?

Ah, never mind – figured it out:

bpy.ops.file.make_paths_relative()