Check to make sure mem is less than con, set work_mem to 1 otherwise.

resolves #185