better -i handling (and passing to sed)