userspace: flush the logger before exiting

Without this we typically won't see the final error message which
explains the shutdown.

Signed-off-by: David Scott <dave.scott@citrix.com>