Move opt_to_dict to ratatosk.utils