Optical absorption in a finite three-dimensional photonic crystal thin film solar cell