fixed sorting problem, needs check. Need to still do colors for file types and do normal output formatting