var provide = function(string){
    var parts = string.split('.');
    var first = parts.shift();
    if(!(first in this)){
        this[first] = {};
    }    
    if(parts.length > 0){
        string = parts.join('.');
        arguments.callee.call(this[first], string);
    }
};

Use like:

provide('org.upshots.widgets');
org.upshots.widgets.SomeWidget = function(){};

POC: http://jsfiddle.net/moagrius/4L31fxoy/1/