add formatting long list format and allow long list for only files or only directories for list_directory.py