Improve the sed replace, so it doesn't clobber 2>&1 redirection.
Submitted by: Wolfgang Jenkner <wjenkner@inode.at>