Add support for OSX

OSX ships with BSD based tools and a very old sed (2005). These changes allow runVimTests.sh to run in OSX while keeping compatibility with GNU tools.