Mocks out file.open to not rely on OS dependent files

Change-Id: I5afc83afd2aa2d7c0dbe98b545fe1b9f90308429
Closes-Bug: #1309256
Merge "Mocks out file.open to not rely on OS dependent files"