Fix blackbox tests when used with build directory preference.

Change-Id: Icb5049d93a69393bedbeb74fb695d28d12732712
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>