Small regenerate_api_key_app_path fix

[related #586]