Let update.py read/write same file one time for all replacements

update.py handles base name replacement after copying each file.
We read/write same file for each replacement, we'd better collect
all replacements and read/write file only one time for all replacements.

Change-Id: Ifa274b6f4426fa0e65e5a3d6fd40dfde3aff1bd2
Closes-Bug: #1304788
apiclient.exceptions.from_response() may miss request_id

The common header name for the request ID value across OpenStack projects is
x-openstack-request-id. However, apiclient.exceptions.from_response() checks
for x-compute-request-id, which is only set in nova and cinder responses.
This precludes the request ID value from being outputted by glanceclient and
others; this hinders error debugging.

Change-Id: Ibb88d5e6a22c7422315dffd7c5853a29864e34d9
Closes-Bug: #1306654
Merge "Let update.py read/write same file one time for all replacements"
Merge "apiclient.exceptions.from_response() may miss request_id"