Fix console width handling for the progress bar

* Don't constantly poll the screen size, listen for SIGWINCH instead
* Check if ioctl(TIOCGWINSZ) failed and use a default screen size

Fixes: bug #15