exFAT improvements, fixes

Move Exec_Cmd to libcrecovery __popen
Provide opt out build flag for exFAT
Default fstype to exfat on external storage if exfat support is
present and fstype is vfat or auto
Fix invalid unmount errors
Improve handling of unencrypted sdcards on Samsung devices
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 5473c8d..0c4471a 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -21,20 +21,28 @@
 #include "bootloader.h"
 #include "variables.h"
 
+extern "C" {
+	#include "libcrecovery/common.h"
+}
+
 
 /* Execute a command */
 
 int TWFunc::Exec_Cmd(string cmd, string &result) {
 	FILE* exec;
-	char buffer[128];
+	char buffer[130];
 	int ret = 0;
-	exec = popen(cmd.c_str(), "r");
+	exec = __popen(cmd.c_str(), "r");
 	if (!exec) return -1;
 	while(!feof(exec)) {
-		if (fgets(buffer, 128, exec) != NULL)
+		memset(&buffer, 0, sizeof(buffer));
+		if (fgets(buffer, 128, exec) != NULL) {
+			buffer[128] = '\n';
+			buffer[129] = NULL;
 			result += buffer;
+		}
 	}
-	ret = pclose(exec);
+	ret = __pclose(exec);
 	return ret;
 }