func Untar(r io.Reader, dir string, isGzipped bool) error {
	return untar(r, dir, isGzipped)
}
TODO(bradfitz): this was copied from x/build/cmd/buildlet/buildlet.go
but there were some buildlet-specific bits in there, so the code is
forked for now.  Unfork and add some opts arguments here, so the
buildlet can use this code somehow.
Untar reads the gzip-compressed tar file from r and writes it into dir.
package util
import (
	"archive/tar"
	"compress/gzip"
	"fmt"
	"io"
	"os"
	"path/filepath"
	"strings"
	"time"
)