Additions to file module

Adding a very simple function to write provided contents to a file, over writing existing contents.