cachestat cleanup to remove exception case (#1905)

Based on good stuggestions from @jbau.  Now cleaner and doesn't have any
uncaught exceptions.

The diff here isn't al that helpful -- best to just look at the resulting code since the whole (small) function is basically rewritten