Fixes `sed -i` on OS X.

Using `sed -i.bak` instead of `sed -i` which works for both BSD an GNU
versions of `sed`.

`make test` now passes on both OS X and GNU/Linux.
Fixes #5.