Fixed subtle bug in test.

Test was reading ASCII files into a buffer the same as the
file length and was NULL terminating the string at the file
length. However, on Windows, reading an ASCII file removes
strips carriage returns making the string shorter than file
length. This resulted in junk between valid text and the NULL
termination. Fixed by directly reading files into strings.

Change-Id: I9e02af86309092d342d7101baec347c8534b3f44
Merge topic 'fixed-testxmlfileoutput-test' into master

d718d4f6 Fixed subtle bug in test.