Sleep on error in accept loop.

Avoid flood of error logs upon too many open file error on Linux.
Get install directory from environment variable.