Remove redundant --directory when testing for GNU ls.