print error msgs if shm removal fails; properly handle out-of-tree builds in tools...