Matlab on file directory operations and read and write files