fixing the listDirectory logic in sshoutputhandler