Move test libraries under /data/nativetests

Move libraries used in bionic-unit-tests out of system partition to
/data/nativetests../bionic-loader-test-libs

Bug: http://b/22182538
Test: build bionic and run bionic-unit-tests
Change-Id: I170177bef782839d0b4970ae4418bf54d0a77836
diff --git a/tests/gtest_main.cpp b/tests/gtest_main.cpp
index 4abd37e..f2b7edd 100644
--- a/tests/gtest_main.cpp
+++ b/tests/gtest_main.cpp
@@ -55,6 +55,16 @@
   return g_executable_path;
 }
 
+bool get_realpath(const std::string& path, std::string* real_path) {
+  char realpath_buf[PATH_MAX];
+  if (realpath(path.c_str(), realpath_buf) != realpath_buf) {
+    return false;
+  }
+
+  *real_path = realpath_buf;
+  return true;
+}
+
 int get_argc() {
   return g_argc;
 }