Fix .travis files

- OSX sed expects parameter for "-i" option
- for Windows and OSX build, we need to get the commit hash of HEAD~
  instead of HEAD because we made an extra commit to trigger the build