use perl instead of sed, since sed -i can't work consistently across linux and osx