Added tests for HasNext and a new QEA UseFile.

These tests failed because of an issue I pointed out in an email. I have
commented out the correct code. If you understand the issue then you can
remove this commented code.