fixes to flat command

fixes to #179
not sure it fixes your problem with rifle (I saw and see no problems with opening files)
fixes problem with copying files under subfolders in flat view