Gracefully handle unexpected source structure

Closes https://github.com/CocoaPods/Core/issues/110