organizing scraper.js
scraper now automatically makes files the right size
fixed error when database does not have any data for the requested range