implemented support for config files, logging and progress bars.
fixed py3 compatibility issues.
Merge pull request #138 from xrotwang/config

implemented support for config files, logging and progress bars.