moved and renamed getcore and getcoretype to a generic coreutils class
so other classes can use it.