west: Use find_build_dir in run_common

In preparation for upcoming changes to the way the default build folder
is defined, switch to using the common find_build_dir() function in the
runners.
This actually changes the behavior for the west build command slightly,
since the current working directory (cwd) will now be checked after the
default build folder ('build'). This brings it in line with what is
used for the runners.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
diff --git a/scripts/west_commands/build_helpers.py b/scripts/west_commands/build_helpers.py
index 7f3b702..3303bc6 100644
--- a/scripts/west_commands/build_helpers.py
+++ b/scripts/west_commands/build_helpers.py
@@ -21,22 +21,25 @@
 '''Name of the default CMake generator.'''
 
 BUILD_DIR_DESCRIPTION = '''\
-Build directory. If missing and run in a Zephyr build directory, it is
-used; otherwise, it's "{}".'''.format(
-    DEFAULT_BUILD_DIR)
+Build directory. If not given, {}/ is used; otherwise if the current directory
+is a Zephyr build directory, it is used.'''.format(DEFAULT_BUILD_DIR)
 
 
 def find_build_dir(dir):
     '''Heuristic for finding a build directory.
 
-    If the given argument is truthy, it is returned. Otherwise, if
+    If the given argument is truthy, it is returned. Otherwise if the
+    DEFAULT_BUILD_DIR is a build directory, it is returned. Next, if
     the current working directory is a build directory, it is
-    returned. Otherwise, DEFAULT_BUILD_DIR is returned.'''
+    returned. Finally, DEFAULT_BUILD_DIR is returned.'''
     if dir:
         build_dir = dir
     else:
         cwd = os.getcwd()
-        if is_zephyr_build(cwd):
+        default = os.path.join(cwd, DEFAULT_BUILD_DIR)
+        if is_zephyr_build(default):
+            build_dir = default
+        elif is_zephyr_build(cwd):
             build_dir = cwd
         else:
             build_dir = DEFAULT_BUILD_DIR