topdir should be a real path
diff --git a/tools/build_libvirt.sh b/tools/build_libvirt.sh
index 8fb45d1..60e6cae 100755
--- a/tools/build_libvirt.sh
+++ b/tools/build_libvirt.sh
@@ -17,7 +17,7 @@
 
 # Keep track of the current directory
 TOOLS_DIR=$(cd $(dirname "$0") && pwd)
-TOP_DIR=$TOOLS_DIR/..
+TOP_DIR=`cd $TOOLS_DIR/..; pwd`
 
 # Where to store files and instances
 WORK_DIR=${WORK_DIR:-$TOP_DIR/work}