Fixes #843: Handle resizing of terminal in progress bar
Fix for non-tty-based consoles