Create/Write/Append to a File

S3 generic method writeFile to create/write/append to a file on HDFS