You could do what I suggested in post 5 and change the template in calibre. Something like
Code:
{title:'re($, '[.,]', '_')'} - {authors:'re($, '[.,]', '_')'} ({id})
would change all commas and periods into underscores, leaving the rest of the characters untouched.