Fix update command on OS-X

`sed -i` isn't portable, but `perl -pi` is
(http://stackoverflow.com/a/22247781/27581)