Fix issue with sed overwriting symlinks