refactor scrape vars, and fs write outside loop

I assigned the scraped attributes directly to the object, since keys are as verbose as the variable names were, and those weren't being used anywhere else. The code was already structured well enough for fs.writeFile to be called outside the loop, so I did that for you. Dunno if you want my error message, or if you'd rather write `[]` to the file.