Only allow alphabetic characters and dots in domain

This PR also fixes #24.