A foundry based in Batley has been fined after a worker suffered serious burns when his clothing caught fire.