Implemented saving of a canvas to file and part of loading.