Fix path copy error and add more logs. (#10324)
Fix path copy error and add more logs. (#10324)

Since we didn't copy the null terminator to temp_filepath, dirname could return the wrong result.
ofirluzon/redis,PKRoma/redis,soloestoy/redis,charsyam/redis,oranagra/redis,ofirluzon/redis,soloestoy/redis,antirez/redis,antirez/redis,PKRoma/redis,soloestoy/redis,neomantra/redis,charsyam/redis,ofirluzon/redis,yossigo/redis,soloestoy/redis,antirez/redis,yossigo/redis,PKRoma/redis,yossigo/redis,neomantra/redis,oranagra/redis,PKRoma/redis,yossigo/redis,PKRoma/redis,oranagra/redis,charsyam/redis,antirez/redis,charsyam/redis,charsyam/redis,oranagra/redis,oranagra/redis,ofirluzon/redis,yossigo/redis,neomantra/redis,soloestoy/redis,ofirluzon/redis,neomantra/redis,neomantra/redis