Fix errors running ls on OSX.