Fixed bug involving serial number filtering
and added a test to the eunit cases

Squashed commit of the following:

commit e0f27294c2518cec942d85fc0bf5b83b81ae2d84
Author: Samvit Ramadurgam <samvit@asana.com>
Date:   Tue Jul 30 16:36:30 2013 -0700

    made the test pass

commit 73c0c96cbef0edba3fba2f2197ab54bd8a970cff
Author: Alex Davies <alexd@asana.com>
Date:   Tue Jul 30 16:09:59 2013 -0700

    Work on a test to demonstrate the bug with old messages