Your issue has happened to me several times. Its problem lies in the backup folder. Make a clean extract of the game and place the 'randomportraits' folder inside the mods folder. Only then launch the game for the first time and apply the mod following the modding guide. The game will close, now you have to delete the backup folder (inside game folder) before doing anything else. Finally launch the game and confirm that the mod is applied and the game is working.
Viewing post in Improved Random Portraits v1.0
You need to extract the game fresh. The problem was that the old version would backup already modified files, potentially broken files, then use those files. Some versions also didn't replace the back'ed up files with the new files so it'd potentially intermix versions.
Extract a fresh copy of the game, the entire game to a fresh folder, don't mess with the backup folder. Run it, then click apply for mods.