fixes #2633 - enable generate_token rake task to run from elsewhere