Photoemission Spectra Of Nanostructured Solar Cell Interfaces From First Principles