Fix potential infinite loop in build dir cleaning.

We should not even try to remove any empty directories outside the
actual build tree, as they might not belong to us.

Task-number: QBS-533

Change-Id: Ia5f4caf97155b0a1711add1bb5efd5f8fa08562b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>