Made OpenFileHandle and OpenDirHandle interfaces instead of concrete classes