Make all the commands executable
Remove uncompatible use of sed

On Mac OS, sed -u (unbuffered input) doesn't work.