code: func (actor Actor) CreateExecutableCopy(path string, tempPluginDir string) (string, error) {
  	tempFile, err := makeTempFile(tempPluginDir)
  	if err != nil {
  		return "", err
  	}
  
  	// add '.exe' to the temp file if on Windows
  	executablePath := generic.ExecutableFilename(tempFile.Name())
  	err = os.Rename(tempFile.Name(), executablePath)
  	if err != nil {
  		return "", err
  	}
  
  	err = fileutils.CopyPathToPath(path, executablePath)
  	if err != nil {
  		return "", err
  	}
  
  	err = os.Chmod(executablePath, 0700)
  	if err != nil {
  		return "", err
  	}
  
  	return executablePath, nil
  }
docs: // CreateExecutableCopy makes a temporary copy of a plugin binary and makes it
  // executable.
  //
  // config.PluginHome() + /temp is used as the temp dir instead of the system
  // temp for security reasons.