Replace unnecessary dots with underscores, except .e