Fixed variable typo
Only search image base name not the entire path
Merge pull request #1 from icecreammatt/master

Fixed missing output