Adds "unclosed file detection" to the test framework using lsof

This is an alternative to #450 that calls out to `lsof` to find the files opened by the process.

It's much slower, so it's an option (`--open-files`), but it seems to work, and it doesn't care whether the file was closed explicitly or implicitly (for better or worse).