Ensure trailing `.` in domain names are preserved

This avoids an IE8 issue.

Closes #17.