Fixed bug related to filewalk

Original code used a queue rather than a stack for storing previous
visited root dirs.  This has been fixed by using a stack. Also fixed the
check for omitted dirs so that we check on the root rather than on each
directory