Fix `make book` on Mac

The BSD version of sed included on Mac OSX has very primitive argument parsing. When running `make book`, `fix-edit-button.sh`'s sed call fails because the `-i` flag tries to associate with the sed script. My fix checks if `--version` succeeds to decide if it should use the BSD or GNU syntax.
This check should be based on `sed` rather than on the underlying kernel.

The problem is that mac includes a different `sed` by default, but it should be possible for a mac user to intall the GNU sed, right?