list directory contents if is directory

I added a small feature to display a file listing if the given file is of type directory.  This is useful for me and perhaps others, so here you go if you're interested! 
As this is optional, simply don't supply this when the user hasn't asked for it.  That is to say lose the entire else condition.