Fix permissions of written maintenancetool

Change-Id: I175d94cda81b0947c5f721022a22b087ca6f1c97
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>