Fixing invalid characters and colliding file names

Follow