Fixed sed -i issue for OSX vs Linux 3