Fix sed errors on OSX, without breaking ubuntu

h/t @Keithbsmiley. Closes #125
Merge branch 'master' into dev