More Pythonic code for downloading file arrays in generated apps.

Typical download code after this change:

  for i, f in enumerate(requiredfilearray):
    dxpy.download_dxfile(f.get_id(), "requiredfilearray-" + str(i))
  if optionalfilearray is not None:
    for i, f in enumerate(optionalfilearray):
      dxpy.download_dxfile(f.get_id(), "optionalfilearray-" + str(i))