Test: fix RDB test checking file permissions.
Test: fix RDB test checking file permissions.

When the test is executed using the root account, setting the permission
to 222 does not work as expected, as root can read files with 222
permission.

Now we skip the test if root is detected.

This fixes issue #1034 and the duplicated #1040 issue.

Thanks to Jan-Erik Rediger (@badboy on Github) for finding a way to reproduce the issue.

wuyu201321060203/redis-3.0-annotated,ncopa/redis,ReadCode/redis-3.0-annotated,cloudrain21/redis,PradheepShrinivasan/redis,mengzhejin/RedisStudy,zczhuohuo/redis,nnog/redis,z-fork/redis,SummonY/redis,huangz1990/experiment-redis,Sciumo/redis,j0hnma/szredis,Sciumo/redis,brg-liuwei/redis,alenslan/redis,wbailey5/redis,ksarch-saas/redis,xujunhai1991/redis,pietern/redis,mumingv/redis,citusdata/redis,LongXQ/redis,zguangyu/redis,LongXQ/redis,GitHubMota/redis,zhcy/redis,Aaron1992/redis,rogerchina/redis,fengshao0907/redis-3.0-annotated,tanghaodong25/redis,mengyou0304/redis,tjschuck/redis,zhoudayang/redis,valdsJohn/redis,jackyan/redis,saisai/redis,miaoyc1989/redis-3.0-annotated,gechong/redis-3.0-annotated,miaoyc1989/redis-3.0-annotated,july2993/redis,xlzhan/redis,Hailei/redis,ttuna/msot-redis,nilyang/redis-tdd-annotation,gongice/redis-3.0-annotated,tanghaodong25/redis,taoguan/redis,ofirluzon/redis,ttuna/msot-redis,seppo0010/rlite-server,Aliceljm1/redis-3.0-annotated,harrisonfeng/redis,tzq668766/redis-3.0-annotated,holstvoogd/redis,shreesundara/redis,ErikDubbelboer/redis,zczhuohuo/redis,colstrom/redis,flashbuckets/redis,whille/redis-3.0-annotated,sunlianqiang/redis-3.0-annotated,itugs/redis,colstrom/redis,ouyangkongtong/redis,huangz1990/experiment-redis,GrimDerp/redis,takeshineshiro/redis,YongMan/redis,jbochi/redis,ton31337/redis,yossigo/redis,RepmujNetsik/redis,davidradunz/redis,MOON-CLJ/redis,louisliangjun/redis,fankeke/redis-3.0-annotated,Hailei/redis,wbailey5/redis,arijitvt/redis,gongice/redis-3.0-annotated,charsyam/redis,oranagra/redis,davidradunz/redis,YuraLukashik/redis,francischan714/redis,JoeWoo/redis,gilala/redis,4396/redis,YongMan/redis,atreeyang/redis,nnog/redis,taoguan/redis,AplayER/redis,soloestoy/redis,fankeke/redis-3.0-annotated,PradheepShrinivasan/redis,mverrilli/redis,nnog/redis,HouKangkang/redis-3.0-annotated,csuhawk/redis,shshlzh/redis-3.0-annotated,mengzhejin/RedisStudy,rrsean/redis-3.0-annotated,NBSW/redis,mcanthony/redis,j0hnma/szredis,cnbin/redis,fengshao0907/redis,dayuoba/redis,Hailei/redis,louisliangjun/redis,xujunhai1991/redis,shining-yang/redis,ctripcorp/redis,kaushik94/redis,ErikDubbelboer/redis,a-pavlov/redis,charsyam/redis,cusspvz/redis,jackyan/redis,GrimDerp/redis,antirez/redis,ctripcorp/redis,YongMan/redis,tjschuck/redis,spearhead-ea/redis,ipmobiletech/redis,jbochi/redis,abhiklodh/redis,kensou97/redis,dongqifan2/redis-3.0-annotated,itamarhaber/redis,louisliangjun/redis,AALEKH/redis,shreesundara/redis,haima-zju/redis-3.0-annotated,devaos/redis,xuguruogu/redis,clamoriniere1A/redis,Wangyao14cyy/redis,charsyam/redis,narma/redis,kensou97/redis,wenxueliu/redis_comment,izhoujie/redis,simplestbest/redis,itamarhaber/redis,LongXQ/redis,rogerchina/redis,MasahikoSawada/redis,hedisdb/hedis,idning/redis,timothyohare/3rdPartySrc-redis,josiahcarlson/redis,ouyangkongtong/redis,rogerlz/redis,tellapart/redis,devaos/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,gilala/redis,haima-zju/redis-3.0-annotated,ituncle/redis,zczhuohuo/redis,seppo0010/rlite-server,YuanZhewei/redis,zy416548283/redis-3.0-annotated,flashbuckets/redis,seandsky/redis,rogerchina/redis,unasm/redis-3.0-annotated,janekmi/redis,nuxeh/redis,elkingtonmcb/redis,honestme/redis,PKRoma/redis,soloestoy/redis,harrisonfeng/redis,elkingtonmcb/redis,nilyang/redis-tdd-annotation,pedigree/redis,Aaron1992/redis,oranagra/redis,nilyang/redis-tdd-annotation,OmarQunsul/graph-redis,ReadCode/redis-3.0-annotated,zhoudayang/redis,shshlzh/redis-3.0-annotated,splitice/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,izhoujie/redis,ytjiang/redis,0x55/redis-3.0-annotated,gilala/bjredis,alenslan/redis,dayuoba/redis,neomantra/redis,saisai/redis,fengshao0907/redis,MSOpenTech/redis,zguangyu/redis,jxwr/redis,shreesundara/redis,pedigree/redis,kaushik94/redis,citusdata/redis,alenslan/redis,wenxueliu/redis_comment,onlymellb/redis-3.0-annotated,Aliceljm1/redis-3.0-annotated,4396/redis,whille/redis-3.0-annotated,josiahcarlson/redis,ramonsnir/redis,cusspvz/redis,zhaobo1023/redis-3.0-annotated,mcanthony/redis,alenslan/redis,ofirluzon/redis,hgl888/redis,ncopa/redis,ton31337/redis,soloestoy/redis,healerkx/redis,spearhead-ea/redis,ouyangkongtong/redis,yuhc/redis-benchmark-enhanced,holstvoogd/redis,neomantra/redis,StevenTsai/redis,himoca/redis,ksarch-saas/redis,YuanZhewei/redis,simplestbest/redis,thomasdarimont/redis,SyntaxStacks/redis,huangz1990/redis-3.0-annotated,aim-for-better/redis,cusspvz/redis,sunheehnus/redis,universsky/redis,Aliceljm1/redis,dongqifan2/redis-3.0-annotated,francischan714/redis,louisliangjun/redis,janekmi/redis,shining-yang/redis,JoeWoo/redis,cnbin/redis,rogerlz/redis,sunlianqiang/redis-3.0-annotated,blackmady/redis,badboy/redis,brg-liuwei/redis,wbailey5/redis,nnog/redis,h0x91b/redis,maodeyi/redis_lua,moonbingbing/redis-3.0-annotated,ttuna/msot-redis,j0hnma/szredis,HouKangkang/redis-3.0-annotated,z-fork/redis,mingyaaaa/redis,ttuna/msot-redis,shshlzh/redis-3.0-annotated,j0hnma/hszredis,onlymellb/redis-3.0-annotated,SyntaxStacks/redis,CodeJuan/redis,pmem/redis,josiahcarlson/redis,Aliceljm1/redis-3.0-annotated,gechong/redis-3.0-annotated,tanghaodong25/redis,wangyikai/redis,idning/redis,jxwr/redis,HunanTV/redis,seandsky/redis,citusdata/redis,weizijun/redis,guker/redis,shining-yang/redis,linfangrong/redis,h0x91b/redis,dreamquster/redis,soveran/redis,yossigo/redis,MSOpenTech/redis,wbailey5/redis,rrsean/redis-3.0-annotated,Aliceljm1/redis,fengshao0907/redis-3.0-annotated,AALEKH/redis,adamweixuan/redis-3.0-annotated,ctripcorp/redis,moonbingbing/redis-3.0-annotated,spinlock/redis,pietern/redis,flashbuckets/redis,janekmi/redis,modulexcite/redis,Markgorden/redis,gechong/redis-3.0-annotated,hgl888/redis,mgk/redis,jxwr/redis,rogerchina/redis,aim-for-better/redis,aim-for-better/redis,ytjiang/redis,abhiklodh/redis,francischan714/redis,ncopa/redis,hornen/redis,iandyh/redis,allengaller/redis,roth1002/redis,NBSW/redis,harrisonfeng/redis,wangyikai/redis,ton31337/redis,h0x91b/redis,allengaller/redis,yuzhangjob/redis-3.0-annotated-unstable,zguangyu/redis,linfangrong/redis,programmecat/redis,dreamquster/redis,rouzier/redis,drinkthere/redis-3.0-annotated,pcarrier/redis,takeshineshiro/redis,Aaron1992/redis,unasm/redis-3.0-annotated,zhcy/redis,kmiku7/redis,holstvoogd/redis,timothyohare/3rdPartySrc-redis,splitice/redis,mattsta/redis,simplestbest/redis,mverrilli/redis,wujf/redis,Sciumo/redis,ttuna/msot-redis,simplestbest/redis,gaoxianglong/redis,francischan714/redis,seppo0010/rlite-server,saisai/redis,charsyam/redis,cnbin/redis,roth1002/redis,190235047/redis,mattsta/redis,slfs007/mk-redis,oranagra/redis,MOON-CLJ/redis,adamweixuan/redis-3.0-annotated,cusspvz/redis,wujf/redis,xuzhezhaozhao/redis_reading,ErikDubbelboer/redis,guker/redis,xujunhai1991/redis,twskipper/redis,arijitvt/redis,valdsJohn/redis,pmem/redis,timothyohare/3rdPartySrc-redis,j0hnma/hszredis,pkdevbox/redis,MasahikoSawada/redis,huyuezheng/redis,CodeJuan/redis,mgk/redis,ofirluzon/redis,thomasdarimont/redis,cnbin/redis,NBSW/redis,vincent-vivian-liu/redis,charsyam/redis,NBSW/redis,mumingv/redis,neomantra/redis,abhiklodh/redis,huangz1990/experiment-redis,nuxeh/redis,mumingv/redis,ramonsnir/redis,duanx/redis,takeshineshiro/redis,seppo0010/redis,riyan8250/redis,0x55/redis-3.0-annotated,mumingv/redis-3.0-annotated,gaoxianglong/redis,himoca/redis,adamweixuan/redis-3.0-annotated,duanx/redis,rogerlz/redis,modulexcite/redis,fengshao0907/redis,antirez/redis,hawkchch/redis,pcarrier/redis,tellapart/redis,ketor/redis,jbochi/parallel_redis,yuhc/redis-benchmark-enhanced,HunanTV/redis,YuraLukashik/redis,StevenTsai/redis,190235047/redis,taoguan/redis,thomasdarimont/redis,itugs/redis,sunheehnus/redis,GitHubMota/redis,a-pavlov/redis,wprice/redis,zguangyu/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,YuraLukashik/redis,xuguruogu/redis,ipmobiletech/redis,xuguruogu/redis,riyan8250/redis,HunanTV/redis,yuhc/redis-benchmark-enhanced,gilala/hbjredis,OmarQunsul/graph-redis,huangz1990/experiment-redis,j0hnma/hszredis,kensou97/redis,Soledad89/redis,zy416548283/redis-3.0-annotated,mgk/redis,taoguan/redis,msn217/redis-3.0-annotated,GitHubMota/redis,PKRoma/redis,yuzhangjob/redis-3.0-annotated-unstable,qiyang0221/redis,july2993/redis,nuxeh/redis,zhiliaoniu/redis,vincent-vivian-liu/redis,allengaller/redis,OmarQunsul/graph-redis,Soledad89/redis,a-pavlov/redis,maodeyi/redis_lua,YongMan/redis,ton31337/redis,tzq668766/redis-3.0-annotated,hgl888/redis,itamarhaber/redis,wenxueliu/redis_comment,magastzheng/redis-3.0-annotated,4396/redis,hedisdb/hedis,kensou97/redis,soveran/redis,supasate/redis,honestme/redis,ituncle/redis,mverrilli/redis,Wangyao14cyy/redis,modulexcite/redis,0x55/redis-3.0-annotated,healerkx/redis,gilala/hredis,MOON-CLJ/redis,takeshineshiro/redis,magastzheng/redis-3.0-annotated,gaoxianglong/redis,yybirdcf/learn-redis,jingjidejuren/redis,timothyohare/3rdPartySrc-redis,rouzier/redis,AplayER/redis,Markgorden/redis,brg-liuwei/redis,jbochi/redis,soloestoy/redis,ctripcorp/redis,csuhawk/redis,jbochi/parallel_redis,iandyh/redis,ketor/redis,HeartSaVioR/redis,badboy/redis,hawkchch/redis,july2993/redis,drinkthere/redis-3.0-annotated,wprice/redis,atreeyang/redis,mingyaaaa/redis,wprice/redis,clamoriniere1A/redis,qiyang0221/redis,mumingv/redis,ksarch-saas/redis,buobao/redis-3.0-annotated,SummonY/redis,mgk/redis,jackyan/redis,yybirdcf/learn-redis,huyuezheng/redis,supasate/redis,Markgorden/redis,xuzhezhaozhao/redis_reading,jacklee0810/redis-3.0-annotated,gilala/hbjredis,YuanZhewei/redis,jasonkying/redis,ipmobiletech/redis,arijitvt/redis,thomasdarimont/redis,oranagra/redis,ofirluzon/redis,twskipper/redis,soloestoy/redis,OmarQunsul/graph-redis,tzq668766/redis-3.0-annotated,itamarhaber/redis,universsky/redis,slfs007/mk-redis,twskipper/redis,gilala/hbjredis,antirez/redis,ytjiang/redis,ouyangkongtong/redis,neomantra/redis,jasonkying/redis,atreeyang/redis,healerkx/redis,ipmobiletech/redis,Markgorden/redis,pkdevbox/redis,jasonkying/redis,spinlock/redis,190235047/redis,valdsJohn/redis,blackmady/redis,gaoxianglong/redis,ncopa/redis,PKRoma/redis,xujunhai1991/redis,seppo0010/redis,rogerlz/redis,netroby/redis,pcarrier/redis,dayuoba/redis,huyuezheng/redis,j0hnma/szredis,universsky/redis,guker/redis,netroby/redis,fengshao0907/redis-3.0-annotated,zhcy/redis,wujf/redis,josiahcarlson/redis,j0hnma/hszredis,hornen/redis,HunanTV/redis,blackmady/redis,yuzhangjob/redis-3.0-annotated-unstable,PKRoma/redis,csuhawk/redis,davidradunz/redis,oranagra/redis,hornen/redis,HeartSaVioR/redis,gilala/hbjredis,jingjidejuren/redis,tanghaodong25/redis,clamoriniere1A/redis,MSOpenTech/redis,shshlzh/redis-3.0-annotated,riyan8250/redis,Hailei/redis,izhoujie/redis,haima-zju/redis-3.0-annotated,spinlock/redis,zhiliaoniu/redis,citusdata/redis,190235047/redis,ytjiang/redis,wuyu201321060203/redis-3.0-annotated,dongqifan2/redis-3.0-annotated,huangz1990/redis-3.0-annotated,mengzhejin/RedisStudy,zhoudayang/redis,seppo0010/rlite-server,MasahikoSawada/redis,sunlianqiang/redis-3.0-annotated,iandyh/redis,pkdevbox/redis,valdsJohn/redis,cloudrain21/redis,programmecat/redis,mattsta/redis,neomantra/redis,zhaobo1023/redis-3.0-annotated,elkingtonmcb/redis,gilala/bjredis,tjschuck/redis,mumingv/redis-3.0-annotated,0x55/redis-3.0-annotated,healerkx/redis,h0x91b/redis,dayuoba/redis,wenxueliu/redis_comment,cloudrain21/redis,Soledad89/redis,soveran/redis,darksideofthemoo/redis-histogram,pietern/redis,mengyou0304/redis,seandsky/redis,CodeJuan/redis,MasahikoSawada/redis,AplayER/redis,rouzier/redis,holstvoogd/redis,zy416548283/redis-3.0-annotated,hedisdb/hedis,tjschuck/redis,slfs007/mk-redis,elkingtonmcb/redis,hawkchch/redis,RepmujNetsik/redis,buobao/redis-3.0-annotated,modulexcite/redis,ksarch-saas/redis,gilala/hredis,ituncle/redis,yossigo/redis,hawkchch/redis,weizijun/redis,SummonY/redis,itugs/redis,fengshao0907/redis,AplayER/redis,StevenTsai/redis,z-fork/redis,riyan8250/redis,abhiklodh/redis,mverrilli/redis,shreesundara/redis,miaoyc1989/redis-3.0-annotated,miaoyc1989/redis-3.0-annotated,darksideofthemoo/redis-histogram,seppo0010/redis,duanx/redis,seandsky/redis,izhoujie/redis,YuanZhewei/redis,honestme/redis,pmem/redis,programmecat/redis,clamoriniere1A/redis,HeartSaVioR/redis,HeartSaVioR/redis,kmiku7/redis,pkdevbox/redis,jacklee0810/redis-3.0-annotated,SyntaxStacks/redis,PradheepShrinivasan/redis,supasate/redis,JoeWoo/redis,roth1002/redis,zhiliaoniu/redis,idning/redis,seppo0010/redis,pedigree/redis,spearhead-ea/redis,csuhawk/redis,GrimDerp/redis,zhiliaoniu/redis,soveran/redis,huyuezheng/redis,iandyh/redis,colstrom/redis,drinkthere/redis-3.0-annotated,xlzhan/redis,hedisdb/hedis,jasonkying/redis,4396/redis,pietern/redis,Wangyao14cyy/redis,wuyu201321060203/redis-3.0-annotated,pcarrier/redis,devaos/redis,kmiku7/redis,splitice/redis,jackyan/redis,mcanthony/redis,flashbuckets/redis,pedigree/redis,jbochi/parallel_redis,programmecat/redis,gongice/redis-3.0-annotated,vincent-vivian-liu/redis,GrimDerp/redis,PradheepShrinivasan/redis,ofirluzon/redis,mingyaaaa/redis,gilala/bjredis,mingyaaaa/redis,ReadCode/redis-3.0-annotated,Wangyao14cyy/redis,dreamquster/redis,LongXQ/redis,pmem/redis,nuxeh/redis,weizijun/redis,magastzheng/redis-3.0-annotated,tellapart/redis,roth1002/redis,linfangrong/redis,wuyu201321060203/redis-3.0-annotated,colstrom/redis,idning/redis,Sciumo/redis,yossigo/redis,mumingv/redis-3.0-annotated,moonbingbing/redis-3.0-annotated,xuzhezhaozhao/redis_reading,itugs/redis,msn217/redis-3.0-annotated,netroby/redis,buobao/redis-3.0-annotated,PKRoma/redis,davidradunz/redis,brg-liuwei/redis,universsky/redis,jingjidejuren/redis,MSOpenTech/redis,ramonsnir/redis,allengaller/redis,SyntaxStacks/redis,ituncle/redis,tellapart/redis,yybirdcf/learn-redis,zhoudayang/redis,rrsean/redis-3.0-annotated,netroby/redis,twskipper/redis,gilala/hredis,july2993/redis,MSOpenTech/redis,Aaron1992/redis,whille/redis-3.0-annotated,weizijun/redis,splitice/redis,xlzhan/redis,dreamquster/redis,CodeJuan/redis,darksideofthemoo/redis-histogram,atreeyang/redis,gilala/redis,devaos/redis,ErikDubbelboer/redis,onlymellb/redis-3.0-annotated,gilala/redis,Aliceljm1/redis,wujf/redis,Aliceljm1/redis,a-pavlov/redis,darksideofthemoo/redis-histogram,guker/redis,ketor/redis,nilyang/redis-tdd-annotation,janekmi/redis,Soledad89/redis,huangz1990/redis-3.0-annotated,gilala/bjredis,mcanthony/redis,spinlock/redis,jingjidejuren/redis,rouzier/redis,jacklee0810/redis-3.0-annotated,honestme/redis,himoca/redis,YuraLukashik/redis,RepmujNetsik/redis,sunheehnus/redis,antirez/redis,kmiku7/redis,yybirdcf/learn-redis,blackmady/redis,AALEKH/redis,badboy/redis,wangyikai/redis,zhcy/redis,xuzhezhaozhao/redis_reading,unasm/redis-3.0-annotated,hgl888/redis,cloudrain21/redis,zczhuohuo/redis,aim-for-better/redis,qiyang0221/redis,gilala/hredis,xuguruogu/redis,narma/redis,duanx/redis,yossigo/redis,GitHubMota/redis,shining-yang/redis,harrisonfeng/redis,RepmujNetsik/redis,sunheehnus/redis,HouKangkang/redis-3.0-annotated,yuhc/redis-benchmark-enhanced,JoeWoo/redis,arijitvt/redis,wprice/redis,fankeke/redis-3.0-annotated,vincent-vivian-liu/redis,linfangrong/redis,hornen/redis,badboy/redis,kaushik94/redis,mengzhejin/RedisStudy,AALEKH/redis,saisai/redis,kaushik94/redis,wangyikai/redis,maodeyi/redis_lua,msn217/redis-3.0-annotated,SummonY/redis,z-fork/redis,supasate/redis,narma/redis,qiyang0221/redis,zhaobo1023/redis-3.0-annotated,mengyou0304/redis,xlzhan/redis,StevenTsai/redis,mengyou0304/redis