do not show duplicate entries

do not show duplicate entries if a file and a directory exists with the
same name
add support for header and footer