now correctly changes script permission in all cases

Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
Merge pull request #4591 from bcoca/scriptnonrootsudosafe

now correctly changes script permission in all cases