Switching from sed to perl for in-place replacing.

Turns out there's no way to reconcile GNU and BSD sed syntax for -i.
However, perl is available everywhere.

Test Plan:
echo "ab" > a.txt
echo "bc" > b.txt
perl -pli -e "s/b/B/g" "a.txt" "b.txt"
cat a.txt b.txt