fixes crash when using file URLs.

https://github.com/CocoaPods/CocoaPods/issues/2683