Qbs: Fix crash when handling files not belonging to a project

Change-Id: I8631ac0677205412306cb26a85b5b04e6f82fdd2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>