Adjusts regex to fix issues with S3 paths that include periods