Now also checking for the file type when uploading images. Closes #8.