Refactored and corrected folder file identification for paramiko ls results