Add cutting last slash if defined