if rss script is in read-only directory, skip file generation and diff calculations.
fix a tiny bug where imageName would've been assigned to the last file in dir even if it was not on the extension list.

also rewrite a bit (and fix braces)
Merge pull request #80 from bifek/fixrssfn

fix a tiny bug where imageName would've been assigned to the last file...
Merge pull request #81 from bifek/rss-rw

if rss script is in read-only directory, skip file generation