Handle mask_and_scale ourselves instead of using netCDF4

This lets us use NaNs instead of masked arrays to indicate missing values.