Add directory walker test and fix 293

This is the accompanying PR for #293.