Add "unclosed file detection" to the testing framework.

Fix unclosed file bug in logger.py
Fix unclosed file bug in wcs.
Fix unclosed file bug in io.ascii.
Add open_file_detection_test
Update to alternate implementation that uses lsof
Check that we can successfully run lsof
Python 3 fixes
Fix for Python 3.x (to do bungled rebase)
Fix for Python 3 -- use a slice rather than a single element to keep things as byte strings