[scripts] create safe_run() and use it
[scripts] remove mangling of repositories.conf.d