Strip all trailing slashes, to ensure folders are stored correctly