Firm fined after worker's hair ripped out by machinery