Fix bug in 5-3 generating files with random file size

* Fix a bug in atomapp where the number of written bytes could be smaller
than the value provided from the options.
* Make sure atomapp compiles with gdb under linux.
* Don't use time and correct stat format string in runtest.sh.
Include missing header in 5-4

Include sys/stat.h in newduptest.c and make sure gcc uses c99.