OS X test fixes

This PR contains fixes for issues #99, #101, and #102 and another fix for linux-specific `getrusage` measurements.