Fixes #98; added test and test data; fixed previously broken test.