now correctly changes script permission in all cases

should fix #4590

Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>