Allow trailing slash in install root.

Currently, removing a directory specified as "dir/" fails, because the
file name is empty according to Qt logic. Therefore, remove such
trailing slashes first.

Change-Id: I3e5e3c9536dbdf9d20d56f9b19b4d30473161cb7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>