Some fixes from the Gentoo package.
updated sed.sh