Properly concatenate large files read from stdin

See #564.
You'd dynamically construct something like:
```js
function test(){
   var a = 'cows';
   // keep concatenating this function string to add as many entries as you need
})
```