Use PHP stream wrappers for reading/writing buffers to disk