Fix for #4 - remove duplication in code for getting processor count.