Refactor CocoaPods installer

`system()` returns true false or nil. The true case is only with a successful command run which is what we care about here.