move sed to a var and use gsed on OpenBSD

OpenBSD's sed doesn't have -i. This diff splits it out into a var so it can be changed as needed.