[Nexus 5 General] crazycaveman:
For everyone who gets an error message that says "{APP} has unexpected contents", I have created a flashable zip (402 MB) (Mega mirror) that will check all the same files as the OTA (and in the exact same way) and replace any that don't match with the version that was released with KOT49H. It will also check your kernel (boot) and modem, but won't make any changes to those; you'll have to flash manually in fastboot if you get a message that one of those is incorrect. You can flash this as many times as you want and can flash the OTA directly after flashing this.

File: check_hammerhead_kot49h_system.zip
[url=http://goo.gl/xLlREk]Google Drive[/url]
[url=http://goo.gl/lNRLlk]Mega[/url]
MD5: 3a810e0d67e2f7b17af947a9c46664ec *check_hammerhead_kot49h_system.zip

Standard disclaimer: I am not to be held responsible if this messes up your phone in any way. Make sure you have backed up your phone and have backups of your backups. I created it for myself and figured I'd share what I created to benefit others. Just because it works for me does not mean it will work for you. If an alien pops out of your phone or it suddenly implodes or you lose everything on it and have no backups is not my problem.

For those of you who are interested in how I generated this, you'll find the script I created to generate the file below. Also, if you want to check the updater-script that is in the zip file without downloading the whole thing, I've made a paste for easy access.

System checker script (not for the faint of heart!):

If you want to run this to create the zip file yourself, you'll need a zip file of the system directory for the version you're upgrading from and the OTA zip. I'm sure there's a better way to do all this, but this is what my convoluted mind gave me...

Call the script as (2nd argument is optional) ${0} OTA.zip [system_files.zip]

#!/bin/bash
# This requires 1 argument: the update zip filename
update_zip=$1
if [ -z ${update_zip} ]; then
echo "Need to let me know the name of the ota zip file!"
exit 1
fi
system_zip=${2:-$(ls system*.zip)}
extract_dir=/tmp/update_zip_check
update_dir="META-INF/com/google/android"
[ -d "${extract_dir}" ] && rm -rf "${extract_dir}"
mkdir "${extract_dir}"

echo "Updating updater-script for checking and replacing files."
unzip -q -d "${extract_dir}" "${update_zip}" "${update_dir}/update-binary" "${update_dir}/updater-script"

# The following was the old way of updating files
#unzip -q "${system_zip}" $(grep -e 'mount' -e 'getprop' -e 'assert(apply_patch_check(' -e 'assert(apply_patch_space(' ${extract_dir}/${update_dir}/updater-script | sed 's|^assert(\(apply_patch_check("/\)\([^"]*\)\(.*")\));|ifelse(\1\2\3, "", (package_extract_file("\2", "/\2"); ui_print("\/\2")));|' | tee -i ${extract_dir}/${update_dir}/updater-script_check | grep -e 'ifelse' | sed 's|^ifelse(apply_patch_check("/system/\([^"]*\)".*|\1|') -d ${extract_dir}

unzip -q -d "${extract_dir}" "${system_zip}" $(grep -e 'mount' -e 'getprop' -e '^apply_patch_check(' -e '^apply_patch_space(' ${extract_dir}/${update_dir}/updater-script | sed 's!^\(apply_patch_.*\) || abort("\\"/system/\(.*\)\\" .*);$!\1 || (ui_print("/\2 unexpected; replacing"); package_extract_file("\2", "/system/\2"));!' | sed 's!abort!ui_print!' | tee -i ${extract_dir}/${update_dir}/updater-script_check | grep -e '^apply_patch_check("/' | sed 's|^apply_patch_check("/system/\([^"]*\)".*|\1|')

mv "${extract_dir}/${update_dir}/updater-script_check" "${extract_dir}/${update_dir}/updater-script"
cur_dir="$(/bin/pwd)"
cd "${extract_dir}"
echo "Now creating the zip file for flashing."
zip -qr "${cur_dir}/check_system.zip" *

cd "${cur_dir}"
rm -rf "${extract_dir}"
echo 'Done! Please remember to backup any APKs you have replaced on the /system partition of your device; this file will replace with the stock version for your build.'