Yes, he could take you to court but that doesnt mean he'd win. Given your history and the fact that its likely you will be the sole caregiver, you would probably win. l'd call his bluff on that one.
FWIW, when i was considering surnames for my ds someone pointed out to me that traditionally children have always been given the mother's name. If she was married to the father then that would also happen to be the fathers name, but if she wasn´t married the child took her name. The practise of naming the child after the father in unmarried relationships is very new and i'm surprised how many men feel it is their 'right' to give the child their name (regardless of the mothers wishes) when they are not married to the mother.