fix pointer arithmetic
improve reliability of wait()
make less fuss about failing to remove test directory
remove obsolete test