Neatened scanning method.

Now no longer displays a blank header if the directory doesn't exist.