Fix a crash in of_closefork(), bug #551

Apparently dirlookup() might return NULL when trying to query the did
of an open fork:

    dir = dirlookup(ofork->of_vol, ofork->of_did);

Add a NULL check before using the result.