Add exception handling around YAML parsing in metadata.rb.