Now lists all files correctly - at least in the absense of directories under /.
Note: there are valgrind and free() errors that need going over.