Changed the way sed is running on Apple or Linux