Fix atf-c*-api so it renders properly
getcwd does not handle EFAULT on FreeBSD
Get the appropriate priority for the scheduler which will be set

Also, remove/fix some static function prototypes

Sponsored-by: EMC Isilon
Add some more diagnostic data
Add some diagnostics to t_dir