[TASK] Simplify setfilepermissions.sh

Make the setfilepermissions script a bit more readable

Change-Id: I75459381df4c0701aeed75484990ab3ed63f0d2c
Releases: master