Added sync functionality to FileWriter.write.

Also, if the given file already exists on Drive, it is overwritten.  Drive supports multiple files with the same name, and inserting a file to Drive creates a new file by default, so this needs to be explicitly handled.

Also corrected a comment.