Implementing ls -R in  C