Update views.py

file.name.split('.') cause an error when file.name contains more than one dot like "2013.01.01.picname.jpg"
Merge pull request #19 from idoljay/patch-2

Update views.py