don't use sed's -i option to stay posix compliant

POSIX does not define sed's -i option. To stay as portable
as possible we should not relay on it.
Merge pull request #4120

dbe8f75 don't use sed's -i option to stay posix compliant (Fabian Raetz)