SHDP-389 Append for PartitionTextFileWriter

- Added append flag in PartitionTextFileWriter
- Tidy up whole append code
- Removed hflush() method and combined it with flush()
- Made better tests