fixed null dereference in grd5read

when passed a grd3 file, grd5read would segfault on tearing
down the initial grd5_t struct on finding that it was not reading
a grd5 file; setting variable to NULL after mallocing fixes this