Correct small bug into fileio.c

fileio.c could generate wrong compressed file under certain conditions
(for example, when compressing file COPYING)