Don't reject valid entity names

Entity names allow more characters than just letters an numbers, see:
http://www.w3.org/TR/REC-xml/#sec-common-syn

This commit does not handle non-ASCII characters in the names, though.

This should fix #139 as well.