Remove use of sed in-place mode, since it is impossible to do this in a way that is compatible with both *BSD and Linux.