adding unit test for dbm_demo

This is my first attempt at writing a unit test for the DBM demo, to (partially) resolve issue 371 (https://github.com/lisa-lab/pylearn2/issues/371).