Small regenerate_api_key_app_path fix

[fixes #586]