replace autodie with tests for open, opendir, system