Implements a Lazy File class
Associated with a file which is regenerated afresh and never read from. This class doesn’t write the actual file till the file is closed even then it writes only if the new contents and the current contents are different.
Defines a file like class which supports the following:
NOTE: Useful only if you want to rewrite the entire file, small files (memory requirement)
Usage:
file = LazyFile("filename")
file.write(string1)
file.write(string2)
...
file.write(stringn)
file.close() --> if reqd this is the one which really does all the writing