diff --git a/build-binary.py b/build-binary.py
index c6f707b24c74531801338921827c5ffcbb85187b..ae1976d39d1d8afd808e9b0e0fefca3930083f69 100755
--- a/build-binary.py
+++ b/build-binary.py
@@ -28,7 +28,7 @@ def main():
     # Create the output directory, deleting it first if it already exists
     output_dir = get_output_dir(tool)
     if os.path.exists(output_dir): shutil.rmtree(output_dir)
-    os.mkdir(output_dir)
+    os.makedirs(output_dir)
 
     # Build and package for various platforms and architectures
     build_android(tool, versions)