Adding latestTrackingID assignment

This only occurs if all the tracking IDs are already in place and
the grunt task is run - this ensures the latestTrackingId doesn't
get set to -1 at the end of the task.