Adjust logic for deciding if trashbin empty

Any error in opening the trashbin directory returns 'true' for `isEmpty`. An error is prevented by checking if the directory exists before trying to open it.