Ensure directory handle is closed on error return.

git-svn-id: svn://daper.net/moc/trunk@2756 910807d9-36e0-0310-a014-e9ea483e2ba4
Silence compiler warnings when OUT_TEST is enabled.

Amends: r2487 and r2496

git-svn-id: svn://daper.net/moc/trunk@2757 910807d9-36e0-0310-a014-e9ea483e2ba4
Make xsleep() mandatory.

Amends: r2748

git-svn-id: svn://daper.net/moc/trunk@2758 910807d9-36e0-0310-a014-e9ea483e2ba4