Fixed an issue with generating the file key if the input path had a slash