created recreateOutputFolder function
refactored index url generation
passed file reading to io.js