Merge "Change tests to use a temporary dir for files." am: 04b83d8ec2
am: 2597f62b51

Change-Id: Id944ab716a9dfe6422687febb7baa8ca38f5113f