toimg: simplify and restore filename detection
toimg: simplify and restore filename detection

sidward/bart,frankong/bart,Takishima/bart,mrirecon/bart,mjacob75/bart,frankong/bart,sdimoudi/bart,mrirecon/bart,frankong/bart,mrirecon/bart,Takishima/bart,nckz/bart,sdimoudi/bart,mjacob75/bart,grlee77/bart,frankong/bart,frankong/bart,sidward/bart,mjacob75/bart,mrirecon/bart,Takishima/bart,sdimoudi/bart,sdimoudi/bart,sidward/bart,nckz/bart,nckz/bart,mjacob75/bart,mrirecon/bart,grlee77/bart,sidward/bart,grlee77/bart,Takishima/bart,nckz/bart,nckz/bart,sdimoudi/bart,grlee77/bart,grlee77/bart,mjacob75/bart,Takishima/bart,sidward/bart