run-tests: no hard coded default build_dir

When I just want to run scripts/run-test.sh with "-l" option only
to list all testcase, it stucks there and with the following error:

    ./scripts/run-tests.sh: line 88: cd: /home/yliu/project/rethinkdb/build/debug: No such file or directory

Fix it by getting the build dir dynamically and correctly instead
of from a hard coded path.

Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>