Fix generate scripts to work outside of the repo.