Don't use non-portable sed -i shell command

https://bugzilla.gnome.org/show_bug.cgi?id=728506