code: func ensureDirectories(home helmpath.Home, out io.Writer) error {
  	configDirectories := []string{
  		home.String(),
  		home.Repository(),
  		home.Cache(),
  		home.LocalRepository(),
  		home.Plugins(),
  		home.Starters(),
  		home.Archive(),
  	}
  	for _, p := range configDirectories {
  		if fi, err := os.Stat(p); err != nil {
  			fmt.Fprintf(out, "Creating %s \n", p)
  			if err := os.MkdirAll(p, 0755); err != nil {
  				return fmt.Errorf("Could not create %s: %s", p, err)
  			}
  		} else if !fi.IsDir() {
  			return fmt.Errorf("%s must be a directory", p)
  		}
  	}
  
  	return nil
  }
docs: // ensureDirectories checks to see if $HELM_HOME exists.
  //
  // If $HELM_HOME does not exist, this function will create it.