better test for chmod