PrepareBinhostUploads: Fix binhost uri handling.

BUG=chromium:963528
TEST=run_tests, manual

Change-Id: I81a070867870bce9e67c7db00c9a6b8442cd5efe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1661030
Tested-by: Alex Klein <saklein@chromium.org>
Auto-Submit: Alex Klein <saklein@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>
diff --git a/scripts/build_api.py b/scripts/build_api.py
index 4a9bbdb..c2bb40d 100644
--- a/scripts/build_api.py
+++ b/scripts/build_api.py
@@ -185,7 +185,7 @@
       MethodNotFoundError when the method cannot be retrieved from the module.
     """
     try:
-      input_json = osutils.ReadFile(input_path)
+      input_json = osutils.ReadFile(input_path).strip()
     except IOError as e:
       raise InvalidInputFileError('Unable to read input file: %s' % e.message)