As CPUCounter.cores is not guaranteed to be not nil, guard against it being nil
Test to check that CPUCounter.cores is an integer, i.e., implemented on the current system
Made requested changes
Merge pull request #364 from p-originate/cores

Guard against CPUCounter.cores being nil, add a test