Python Operator: Context is Incorrect
Script saves the current file, removes all scenes but the context scene and saves that to a file in the current blends directory with name "SCENE_&lt;context.scene.name&gt;" eg SCENE_Scene.blend for the scene.name of "Scene".  

After which it reopens the original file, links to the scene in the created file, and deletes the original.

import bpy

class BPC_main_Outsource(bpy.types.Operator):
    bl_idname = "scene.outsource"
    bl_label = "Outsource"

    @classmethod
    def poll(cls, context):
        return bpy.data.filepath != "" and context.scene.library is None

    def execute(self, context):
        from os import path

        compScene = context.scene #get scene
        blendFile  = bpy.data.filepath #get path of current file
        clean_name = bpy.path.clean_name(bpy.path.display_name(blendFile))
        apFilename = compScene.name 
        screen_name = context.screen.name
        scene_file_path = blendFile.replace(clean_name, "SCENE_%s" % apFilename)

        if path.isfile(scene_file_path):
            print("Scene file %s already exists" % scene_file_path)
            return {'CANCELLED'}

        bpy.ops.wm.save_mainfile()      

        # remove all but context scene
        for scene in bpy.data.scenes:
            if scene == compScene:
                continue
            bpy.data.scenes.remove(scene)


        # save with only compScene
        bpy.ops.wm.save_as_mainfile(filepath=scene_file_path)        
        # reopen original,link saved scene
        bpy.ops.wm.open_mainfile(filepath=blendFile)  
        scene = bpy.data.scenes.get(apFilename)     
        # link the scene back
        with bpy.data.libraries.load(scene_file_path, link=True, relative=True) as (data_from, data_to):
            data_to.scenes = [apFilename]
        # rename the original scene, remove crashes my blender    
        screen = bpy.data.screens.get(screen_name) 
        scn = screen.scene
        if scene and screen:

            scene.name = "%s_ORIGINAL" % scene.name
            scn = bpy.data.scenes.get(apFilename)
            #c = context.copy()
            print("CONTEXT", bpy.context.window, context.window)
            c = {"scene": scene,
                 "screen": screen,
                 "area": screen.areas[0],
                 "region": screen.areas[0].regions[0],
                 "edit_object": None,
                 "blend_data": bpy.data,
                 "window": bpy.data.window_managers[0].windows[0]
                 }
            bpy.ops.scene.delete(c)
            screen.scene = scn

        return {"FINISHED"}

bpy.utils.register_class(BPC_main_Outsource)

# test run
if bpy.ops.scene.outsource.poll():
    bpy.ops.scene.outsource()
else:
    print("Failed POLL is scene already linked?")