Wait for child processes when shutting down server

Should fix sporadic CI failures
Improve gem pristine warning message

See #240.