When using errno, need errno.h
Fix elifs with nothing to test.
Linux: Check for debugger present via /proc/self/status

Rather than threads/ptrace, which caused hang.