fixes crash when using file URLs.

https://github.com/CocoaPods/CocoaPods/issues/2683
`if host`, please :) (switch the conditional around)