Move read cpuinfo to own method for easy stubbing, fix initial WIP on tests.