Cofinitely semiperfect modules