Make mac work

https://www.pivotaltracker.com/story/show/58354352

Fixes bugs preventing some integration tests from working on some Macs.