Fix classads namespace detection.
Missing headers for stat(). Fixes build on Debian 7 without globus GSSAPI.
Use non-zero error status here. This also fixes "integer from pointer" warning.