Using Drupal.settings.basePath in Modernizer / yepnope.js loads
Your local environment seems to be misconfigured. If you're running apache with vhosts then your VirtualHost definition should look like this:

&lt;VirtualHost *:80&gt;
  ServerName whatever-you-choose-for-a-dev-domain.com
  DocumentRoot "/path/to/the/drupal/root/directory"
&lt;/VirtualHost&gt;


Where the DocumentRoot should also include /sitename/docroot 

Alternatively you may be able to edit .htaccess in the Drupal root directory to 
    RewriteBase /sitename/docroot
Which there should already be a commented definition of RewriteBase in there that you simply would uncomment. But I think the VirtualHost path would be the best one.