Incorporated Vico's fix for scalpel hanging. Basically, the reader thread now lets the main thread know that it is finished reading by placing a dummy buffer on the queue with bytesread = 0 and beginreadpos = 0.
Removed code that attempted to kill threads as it does not work the same on all platforms. In particular, pthreads-win32 requires installation of a device driver in order for this functionality to work.