ls and stat fixes for subdir URLs