This method is doing quite a lot now.  Extract the logic for generating Extensions.plist to a helper method?