 
     if opts.revId
       opts.outdir = path.join opts.outdir, opts.rev
-      opts.baseurl = [ opts.baseurl, opts.rev ].join '/'
+      opts.baseurl = "#{opts.baseurl}/#{opts.rev}"
 
     opts.spriteTmpCssOutdir = @_resolve SPRITES_TMPDIR
     opts.spriteImgOutdir = defined opts.spriteImgOutdir, opts.outdir


      ws.on 'finish', ->
        timeEnd 'styles: write ' + outfile
        if --pending is 0
          secs = ((Date.now() - start)/1000).toFixed 2
          msg = 'written styles to ' + opts.stylesOutdir + ' (' + secs + ')'
          console.log msg
          if not opts.watchCss
            done()
          else

          if not opts.watchJs
            throw err
          else
            errString = JSON.stringify String err
            src = "console.error('#{errString}')"
            fs.writeFile outfile, src, (err) ->
              if err
                console.error err # wtf
              else
                console.log "written error to #{outfile}"
        else

          if opts.extractJsSourcemaps
            s = fs.createWriteStream outfile
            asStream(src).pipe(exorcist(opts.jsSourcemapsOutfile)).pipe(s)

            s.once 'finish', ->
              secs = ((Date.now() - start)/1000).toFixed 2
              msg = "written #{outfile} (#{secs})"
              console.log msg
              console.log "extracted source maps to #{opts.jsSourcemapsOutfile}"
              if not opts.watchJs
                done()
              else
                notify 'scripts', msg

            s.on 'error', (err) ->
              if not opts.watchJs
                throw err
              else
                console.error err

          else

            fs.writeFile outfile, src, (err, res) ->
              if err
                if not opts.watchJs
                  throw err
                else
                  console.error err

              else
                secs = ((Date.now() - start)/1000).toFixed 2
                msg = "#{pretty(src.length)} written to #{outfile} (#{secs})"
                console.log msg

                if not opts.watchJs
                  done()
                else
