Prevent crash for invalid LDML files

This fixes https://jira.sil.org/browse/WS-112 "Crash on Wesay
configuration Tool when importing .ldml file ...".