 
         entry = @append(filename, body, dirname:opts.dirname)
         entry.target = opts.target if opts.target?
+        entry.name = opts.name ? "main"
 
         dirname = path.dirname(file)
         for req in required.strings
-            params = {dirname, fromFile:entry.file}
+            params = {dirname, name:entry.name, fromFile:entry.file}
             if opts.target and /^[.\/]/.test(req)
                 params.target = path.resolve(path.dirname(opts.target), req)
             @require(req, params)


        entry = @append(opts.file, body, {dirname})
        entry.target = opts.target

        for req in nub(required.strings)
            params = {dirname, fromFile:entry.file}
            if opts.target and /^[.\/]/.test(req)
                # not a real directory on the filesystem; just using the path
                # module to get rid of the filename.

            @emit('error', "no size for #{file}") unless opts.size?
        stream.props = size:opts.size
        @_push (done) ->
            return done() if @skip[entry.name]
            @emit('append', stream, entry)
            @tarball.append(stream, done)
            content or= fs.createReadStream(file)
            if typeof content is 'string'
