In dealing with the costs of an action to which this part applies and that is commenced after the expiration of the period of limitation otherwise prescribed by this Act but before the expiration of the period of limitation prescribed by section 29 the court shall, in every case where costs may be awarded to the plaintiff, before awarding such costs, take into consideration—
(a) whether reasonable diligence has been shown in the circumstances in commencing the action; and
(b) whether delay in commencing the action has prejudiced or may prejudice the defendant.