Added a method used in test cases to determine if a file descriptor is closed. Added troubleshooting code (commented out) to help diagnose problems around openning and closing files.