Fixed memory leak in get_full_configpath
Prepared things for friend/key loading/saving.