Implement basic file writing function for RLE class