Strip trailing slashes on restoreprefix.