added clearing of mappings
#22384 added better Null checks.
Merge pull request #25 from shotgunsoftware/22384_proj_install_bug

22384 Fixed a bug which would cause invalid config files to be generated on pre-013 projects.