Make sed do -i '' on OSX

I don't have access to an OSX machine, so if someone could test this that would be great.

Author: Nick Lanham <nick@afternight.org>

Closes #258 from nicklan/osx-sed-fix and squashes the following commits:

a6f158f [Nick Lanham] Also make mktemp work on OSX
558fd6e [Nick Lanham] Make sed do -i '' on OSX

(cherry picked from commit 632c322036b123c6f72e0c8b87d50e08bec3a1ab)
Signed-off-by: Matei Zaharia <matei@databricks.com>