tests: Use gnu sed explicitly in test setup/tear down