Fix path handling for ls