Ininstall script bugfixes

Some bugfixes in the uninstall script.
See: http://trac.i-mscp.net/ticket/816