[FileReference] Correctly encode xml entities

Solves CocoaPods/CocoaPods#2807

/cc @alloy