Following the lead of public safety unions in Salem and Lynn that went to court to protect jobs during layoff season, the Haverhill firefighters' union filed an injunction in Newburyport District Court last week, demanding that the mayor include money in his budget for a minimum of 20 firefighters per 24-hour shift.