Bug setting executable permissions fixed!

The tool was doing the opposite of its purpose. We need tests.