Made check for HOME variable less strict. Fixes breaking shell propagation if run wihtout HOME variable being set, e.g. in systemd environment (OMS-226)