This can be used for unit tests to reduce the need for temporary
files. A MemoryFile acts the same as any other File object, but
stores the contents in memory. The memory pointer can be accessed
directly. A file with the 'memory://' prefix will be a memory file.
Change-Id: I10ae3ed5391c8fd838e6dfb33106dec959bdc224