Make sure tar.gz archives are extracted properly in bld_app.py

Change-Id: I1ee02224d26597c3df2cfea3d90d2f78961a47ad
Reviewed-by: Matti Paaso <matti.paaso@digia.com>
Reviewed-by: Antti Kokko <antti.kokko@digia.com>