mempig: add the ability to daemonize

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>