Fixes to the import scripts to better account for changes to security groups, etc.
More fixes to import scripts, made build_security_groups more fault tolerant..