fix removal of trailing slash to fix breakage when mountpoint is '/'