Add patch that fixes directory_mode functionality.