Refactor trace test

It turns out that root CAN write to files even when the permissions are
0000.