Overwrite support in table.write

I have implemented the overwrite option as requested in the issue 1233. The already existing tests have been executed without errors.