minor mod to make use of jpeg files also

Tested myself and seems ok. Thanks.
Merge pull request #2 from hashashin/patch-1

minor mod to make use of jpeg files also