Modified tests.
- Made file_input_tests more robust (should fail immediately on
  bad inputs).
- Added tests for private functions for socket_input