Percentage based progress

@csfrancis for review

The code is based on top of pull #4, but the changes for this pull request are all in the last commit.

This adds a Progress class to handle progress updates, and prints the progress in percentage.

This still needs to be updated to not show the progress when stdin is not a tty.