Trim the final slash if exist in the given config