See it in action: Short Demo
You can define a function, like this:
function appendScript(pathToScript) {
    var head = document.getElementsByTagName("head")[0];
    var js = document.createElement("script");
    js.type = "text/javascript";
    js.src = pathToScript;
    head.appendChild(js);
}
And then call it with the appropriate argument (e.g. according to screen size), like this:
appendScript("path/to/file.js");
If you also need to remove a script from head (e.g. based on its 'src' attribute), you can define a function, like this:
function removeScript(pathToScript) {
    var head = document.getElementsByTagName("head")[0];
    var scripts = head.getElementsByTagName("script");
    for (var i = 0; i < scripts.length; i++) {
        var js = scripts[i];
        if (js.src == pathToScript) {
            head.removeChild(js);
            break;
        }
    }
}
And then call it with the appropriate argument (e.g. according to screen size), like this:
removeScript("path/to/file.js");
Also, note that using screen.width returns the size of the user's screen (not the browser-window's width).  
If you need to get the window size you can use $(window).width() (using jQuery). 
If you want a "jQuery-free" solution, take a look at this answer for cross-browser alternatives.