Auto-export to OBJ format on save
Here's my answer with most of the script credit going to zeffii from this page. I just added the Save Blend file line at the top.

You can set the output path parent folder with the folder variable. The script creates the child mesh and material folders. The MTL files are moved to the material folder at the end of each OBJ loop.

import bpy
import os
import shutil

bpy.ops.wm.save_mainfile() 


folder = '/path/to/export/folder/'
meshFolder = folder + 'mesh/'
matFolder = folder + 'material/'

if not os.path.exists(folder):
        os.makedirs(folder)
if not os.path.exists(meshFolder):
        os.makedirs(meshFolder)
if not os.path.exists(matFolder):
        os.makedirs(matFolder)        

selected = bpy.context.selected_objects.copy()
bpy.ops.object.select_all(action='DESELECT')

for obj in selected:
    name = obj.name.replace('.', '_')
    obj.select = True
    fullpath = os.path.join(meshFolder, name + '.obj')
    bpy.ops.export_scene.obj(
        filepath=fullpath, 
        check_existing=True, 
        axis_forward='-Z', 
        axis_up='Y', 
        use_selection=True, 
        use_animation=False, 
        use_mesh_modifiers=True, 
        use_edges=True, 
        use_smooth_groups=False, 
        use_smooth_groups_bitflags=False, 
        use_normals=True, 
        use_uvs=True, 
        use_materials=True, 
        use_triangles=False, 
        use_nurbs=False, 
        use_vertex_groups=False, 
        use_blen_objects=True, 
        group_by_object=False, 
        group_by_material=False, 
        keep_vertex_order=False, 
        global_scale=1, 
        path_mode='AUTO')
    obj.select = False
    shutil.move(meshFolder + name + '.mtl', matFolder + name + '.mtl')