Apply better logic when totaling media items in directories; address some typos.  Fixes #40, #31, and #12.