--add: Make sed command compatible with BSD sed

Tested on sed from Mac OS X Mountain Lion, and with gsed from Homebrew.