Add optimization to listdir to return filenames only