Output enumeration results to separate output files

In an enumerate operation where output to file is requested and the
response require more than one pull, only the last pull is saved to
file.  The rest of the response is overwritten.

Our proposal solution is for each pull response, it is saved to a file
with numbered suffix. This is only applicable to an enumerate
operation and an enumeration context is returned.

Also included is a minor fix to file open from read/write to write
mode. I find no reason for the operation to read the output file.
1 file changed