Fix up PR #2465

This could be way more DRY. At least there's a YARD-ish comment.

This fixes up https://github.com/rapid7/metasploit-framework/pull/2465
to be a more complete solution.

@ZeroChaos, let me know what you think and if you can test this right quick on your side with an extant cpuinfo dir?