require mkdirp to fix crashes related to jumping quickly into sub-subdirs before .thumbs folder was created; also made bracket spacing consistent (space before if newline)