Add trailing slash to path prefix if needed