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.

Here is my suggested alternative.


http://pubs.opengroup.org/onlinepubs/9699919799/