[Command::Spec] Fix crash

Closes https://github.com/CocoaPods/CocoaPods/issues/1543
Merge pull request #2479 from CocoaPods/fabio/fix-pod-spec-create-crash

[Command::Spec] Fix crash