Move UIRoot creation inside try block

If not invoked as root, we can't load modules and UIRoot() will raise an
exception.

Signed-off-by: Andy Grover <agrover@redhat.com>