code: func ensureDir(loc string) error {
  	s, err := os.Stat(loc)
  	switch {
  	case err != nil && os.IsNotExist(err):
  		// the location does not exist, so make directories to there
  		return os.MkdirAll(loc, DirPerms)
  	case err == nil && !s.IsDir():
  		return newErrFixtureDirectoryIsFile(loc)
  	}
  
  	return err
  }
docs: // ensureDir will create the fixture folder if it does not already exist.