Add better error messaging to update_foreign_keys!

@3dna/controlpanel @DavidHuie 
paired with @dpoineau