Validate email addresses

I think this will pretty much fix #27...