Merge/affile

- testcase added to affile
- fixed a bug in affile [O_APPEND flag added to DEFAULT_DW_REOPEN_FLAGS]