Check for root and root perms and offer to install/fix

Also fix sort order for file selector by date and file sizes

Change-Id: Idff9fe4232c19d4ed1082e78fabe6f921aa0a114
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp
index 66bf80f..bc10f91 100644
--- a/gui/fileselector.cpp
+++ b/gui/fileselector.cpp
@@ -790,19 +790,19 @@
 		case 3: // by size largest first
 			if (d1.fileSize == d2.fileSize || d1.fileType == DT_DIR) // some directories report a different size than others - but this is not the size of the files inside the directory, so we just sort by name on directories
 				return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0);
-			return d1.fileSize > d2.fileSize;
+			return d1.fileSize < d2.fileSize;
 		case -3: // by size smallest first
 			if (d1.fileSize == d2.fileSize || d1.fileType == DT_DIR) // some directories report a different size than others - but this is not the size of the files inside the directory, so we just sort by name on directories
 				return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
-			return d1.fileSize < d2.fileSize;
+			return d1.fileSize > d2.fileSize;
 		case 2: // by last modified date newest first
 			if (d1.lastModified == d2.lastModified)
 				return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0);
-			return d1.lastModified > d2.lastModified;
+			return d1.lastModified < d2.lastModified;
 		case -2: // by date oldest first
 			if (d1.lastModified == d2.lastModified)
 				return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
-			return d1.lastModified < d2.lastModified;
+			return d1.lastModified > d2.lastModified;
 		case -1: // by name descending
 			return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
 		default: // should be a 1 - sort by name ascending