Fixing parse script bug in NER output reading

I realised this was the source of the problem I mailed you about - the NER output processing part of the PARSE script was using a negative index to head, which is not supported by BSD head (used on OS X). I've changed the scala script instead (making it more imperative, but getting the job done).