Remove trailing slash to work with Windows