sed: fix matching of newlines by $

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>