code: func tempFileName(path string) string {
  	return filepath.Join(filepath.Dir(path), pseudoRand())
  }
docs: // tempFileName returns "random enough" path in the same directory as a given
  // path. It's not actively trying to be secure. Assumes that 'path' is not world
  // writable (i.e. not /tmp).
  //
  // Doesn't check for existence of the file at the given path (e.g. there may be
  // conflicts, but the probability should be small).
  //
  // TODO(vadimsh): Maybe we should change that? This is dangerous assumption.
  // Simple Exists(...) check would reduce the likelihood of a conflict
  // significantly in exchange for some modest performance impact.