Fix clogs scan with more than 2 partitions (fixes #112)
Rewrite the logic for handling multiple partitions in clogs scan

This should be more correct (and more obviously correct) in the face of
zero-sized partitions.
Merge pull request #113 from bmerry/master

Fix for #112