[3.7] bpo-31047: Fix ntpath.abspath to trim ending separator (GH-10082)

diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index f0e03a2..3c820b5 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -523,8 +523,8 @@
     def abspath(path):
         """Return the absolute version of a path."""
         try:
-            return _getfullpathname(path)
-        except OSError:
+            return normpath(_getfullpathname(path))
+        except (OSError, ValueError):
             return _abspath_fallback(path)
 
 # realpath is a no-op on systems without islink support