Remove most -r -w -x tests to avoid ACL problem

Most of these tests are unnecessary.
Use `filetest` pragma in the only one case where these tests make sense.