title: useminPrepare causing a `src` error
body: <p>My <code>index.html</code> has:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;!--[if lt IE 7]&gt;      &lt;html class="no-js lt-ie9 lt-ie8 lt-ie7"&gt; &lt;![endif]--&gt;
  &lt;!--[if IE 7]&gt;         &lt;html class="no-js lt-ie9 lt-ie8"&gt; &lt;![endif]--&gt;
  &lt;!--[if IE 8]&gt;         &lt;html class="no-js lt-ie9"&gt; &lt;![endif]--&gt;
  &lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html class="no-js"&gt; &lt;!--&lt;![endif]--&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;meta name="description" content=""&gt;
      &lt;meta name="viewport" content="width=device-width"&gt;
      &lt;!-- Place favicon.ico and apple-touch-icon.png in the root directory --&gt;
  
  
      &lt;link rel="stylesheet" href="/public/stylesheets/bootstrap.css"&gt;
      &lt;link rel="stylesheet" href="styles/main.css"&gt;
    &lt;/head&gt;
    &lt;body ng-app="WebApp"&gt;
      &lt;base href="/app"&gt;
      &lt;!--[if lt IE 7]&gt;
        &lt;p class="browsehappy"&gt;You are using an &lt;strong&gt;outdated&lt;/strong&gt; browser. Please &lt;a href="http://browsehappy.com/"&gt;upgrade your browser&lt;/a&gt; to improve your experience.&lt;/p&gt;
      &lt;![endif]--&gt;
  
      &lt;!--[if lt IE 9]&gt;
        &lt;script src="bower_components/es5-shim/es5-shim.js"&gt;&lt;/script&gt;
        &lt;script src="bower_components/json3/lib/json3.min.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
  
      &lt;!-- Add your site or application content here --&gt;
      &lt;div class="container" ng-view=""&gt;&lt;/div&gt;
  
      &lt;!-- Google Analytics: change UA-XXXXX-X to be your site's ID --&gt;
       &lt;script&gt;
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
         m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
         })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  
         ga('create', 'UA-XXXXX-X');
         ga('send', 'pageview');
      &lt;/script&gt;
  
      &lt;script src="/app/bower_components/angular/angular.js"&gt;&lt;/script&gt;
      &lt;!-- build:js /app/scripts/angular.js --&gt;
      &lt;script src="/app/bower_components/angular-route/angular-route.js"&gt;&lt;/script&gt; 
      &lt;script src="/app/bower_components/angular-resource/angular-resource.js"&gt;&lt;/script&gt;
      &lt;script src="/app/bower_components/angular-cookies/angular-cookies.js"&gt;&lt;/script&gt;
      &lt;script src="/app/bower_components/angular-sanitize/angular-sanitize.js"&gt;&lt;/script&gt;
      &lt;!-- endbuild --&gt;
  
      &lt;!-- build:js({.tmp,app}) /app/scripts/scripts.js --&gt;
      &lt;script src="/app/scripts/app.js"&gt;&lt;/script&gt;
      &lt;script src="/app/scripts/controllers/main.js"&gt;&lt;/script&gt;
      &lt;!-- endbuild --&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>All of my angular code is in a <code>app</code> directory from the top level. My <code>Gruntfile.coffee</code> is:</p>
  
  <pre><code>useminPrepare:
    html: "&lt;%= appConfig.app %&gt;/index.html"
    options:
      dest: "&lt;%= appConfig.dist %&gt;"
  
  usemin:
    html: "&lt;%= appConfig.dist %&gt;/*.html"
    css: ["&lt;%= appConfig.dist %&gt;/styles/**/*.css"]
    options:
      dirs: ["&lt;%= appConfig.dist %&gt;"]
  </code></pre>
  
  <p>But I'm getting an error:</p>
  
  <pre><code>Running "useminPrepare:html" (useminPrepare) task
  Going through app/index.html to update the config
  Looking for build script HTML comment blocks
  Warning: An error occurred while processing a template (Cannot read property 'src' of undefined). Use --force to continue.
  </code></pre>
  
  <p>What am I doing wrong?</p>