correcting gwtoolset permission check

Bug: 58602
Bug: 58598
Bug: 58636
Change-Id: Ibd1ab2c9fe4f72d4b9ca7f1515a49bd73a15babe