Source functions before stackrc

The enable_service() and disable_service() functions in
https://review.openstack.org/9407 require the functions
file be sourced before stackrc.

* exercise.sh
* samples/local.sh (this will require manual addition to the user's
  local.sh if they based it on the sample)
* tools/build_bm.sh

Change-Id: I1bed687867e870bef5748289d712376435a776af
diff --git a/tools/build_bm.sh b/tools/build_bm.sh
index b2d4c36..ab0ba0e 100755
--- a/tools/build_bm.sh
+++ b/tools/build_bm.sh
@@ -5,6 +5,13 @@
 # Build an OpenStack install on a bare metal machine.
 set +x
 
+# Keep track of the current directory
+TOOLS_DIR=$(cd $(dirname "$0") && pwd)
+TOP_DIR=$(cd $TOOLS_DIR/..; pwd)
+
+# Import common functions
+source $TOP_DIR/functions
+
 # Source params
 source ./stackrc