Make string replacement scripts OS-proof with uname

This is needed because sed needs a value with option -i on FreeBSD.