Generalize shebang update on install

Already done for most of scripts.
Here the remaining (I hope I haven't miss any)

Notice, this pull request is against master, but It will be nice to also apply it in Framework 5.2.

P.S. this is a mandatory fix for downstream packaging.