modified so it works on Macs without dircolors