Fixing file extension logic error

The pythonic way to select the last segment of a file name is using the -1 index. Fixes for images with names like Screen Shot 2013-09-05 at 1.19.09 PM.png
Merge pull request #30 from johndavidback/patch-1

Fixing file extension logic error