Fix for Node.js 0.10.x. Buffer parser should throw on EOF.

The current script engine expects the buffer parser to throw an exception if it
unexpectedly encounters the end of the file. This used to be default behavior in
Node.js' Buffer#slice, but changed in 0.10, so we need to throw manually.