Remove obsolete .txt in str_replace.