First stab at regression test for chmod (and chflags, chgrp and chownwhich are the same binary). This is supposed to exercise all syscallspaths through those tools and not a comprehensive regression test.