Add more sed features, fixes #41