Fixed animated progress bar in batch mode.
Made size of progress bar automatically adjusted to the terminal.