Trim whitespace from targetdirectory

Task-number: QTIFW-468
Change-Id: Ib657fe5cbdcebaecf53be11db35888fa132822fa
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>