Handle throttling errors in uploader script.
Fixed potential issue with is_done() method.

Depending on how frequently this gets called, it is possible to stop,
i.e. terminate the job, after the WRONG number of steps. This is
because we get the most recently completed process step, and check its
contents; however, it is conceivable that had we not called this method
during the execution of the previous process step, then that one may
have actually already outputted 'FinalRank'.

To remember this, we keep track of the last process step we checked the
output for, and then iterate through the whole range of iterations to
find the first (if any) that have outputted 'FinalRank'.