Fish sprouted fingers before they ventured onto land, fossil shows