Method to add trailing slash to path