Rename invalid filename to valid filename.