Fix places where we could throw exceptions from the progress bar

If execution ended right away, it would take place before the
progress bar started, so the bar would continue forever. Now
we start the bar before spinning off threads.

If the bar was manually closed, pulse would still try to run
and cause a traceback.  Checking if the bar is still there
before attempting to pulse.  If it is not, the loop will
end.