Added regression test for issue #4; fixed an unrelated bug in setup.py