Biden signs bill to avert rail strike and ‘an economic catastrophe at a very bad time in the calendar’